diff options
author | Thierry Crozat | 2017-11-11 00:11:50 +0000 |
---|---|---|
committer | Thierry Crozat | 2017-11-11 00:11:50 +0000 |
commit | b93fefebe8f449d7522047283bab163b8c91d8a4 (patch) | |
tree | e3ed7d55b5a21b3815a779f564f169af7815ee11 /backends | |
parent | 2b00829f09609447758dc55956dd6a345b878c4b (diff) | |
download | scummvm-rg350-b93fefebe8f449d7522047283bab163b8c91d8a4.tar.gz scummvm-rg350-b93fefebe8f449d7522047283bab163b8c91d8a4.tar.bz2 scummvm-rg350-b93fefebe8f449d7522047283bab163b8c91d8a4.zip |
SDL: Fix display artefacts with transparent OSD message
If we do not update the area below the message, it is just blitted on top
of itself again and again and gets progressively less transparent. It also
causes artefacts when the mouse pass below the OSD message.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 90f9f7e1a1..4a6061c428 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -2366,6 +2366,7 @@ void SurfaceSdlGraphicsManager::removeOSDMessage() { // Remove the previous message if (_osdMessageSurface) { SDL_FreeSurface(_osdMessageSurface); + _forceRedraw = true; } _osdMessageSurface = NULL; @@ -2387,7 +2388,6 @@ void SurfaceSdlGraphicsManager::updateOSD() { _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; } SDL_SetAlpha(_osdMessageSurface, SDL_RLEACCEL | SDL_SRCALPHA, _osdMessageAlpha); - _forceRedraw = true; } if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) { @@ -2395,8 +2395,8 @@ void SurfaceSdlGraphicsManager::updateOSD() { } } - if (_osdIconSurface) { - // Redraw the area below the icon for the transparent blit to give correct results. + if (_osdIconSurface || _osdMessageSurface) { + // Redraw the area below the icon and message for the transparent blit to give correct results. _forceRedraw = true; } } |