Commit a38c6d0f authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix minor artefact with animated image

Don't do anything if the image doesn't change. Otherwise, some unpleasant
flickering occurs when the image is animated.
parent 66456370
......@@ -132,6 +132,9 @@ void CtrlButton::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h )
void CtrlButton::setImage( AnimBitmap *pImg )
{
if( pImg == m_pImg )
return;
AnimBitmap *pOldImg = m_pImg;
m_pImg = pImg;
......
......@@ -159,6 +159,9 @@ void CtrlCheckbox::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h
void CtrlCheckbox::setImage( AnimBitmap *pImg )
{
if( pImg == m_pImgCurrent )
return;
AnimBitmap *pOldImg = m_pImgCurrent;
m_pImgCurrent = pImg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment