diff options
Diffstat (limited to 'backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp')
-rw-r--r-- | backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 0938be2d4e..9e75dd10f4 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -257,38 +257,6 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() { _forceFull = true; } -#ifdef USE_OSD - // OSD visible (i.e. non-transparent)? - if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) { - // Updated alpha value - const int diff = SDL_GetTicks() - _osdMessageFadeStartTime; - if (diff > 0) { - if (diff >= kOSDFadeOutDuration) { - // Back to full transparency - _osdMessageAlpha = SDL_ALPHA_TRANSPARENT; - } else { - // Do a linear fade out... - const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100; - _osdMessageAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; - } - _forceFull = true; - } - - if (_osdMessageAlpha == SDL_ALPHA_TRANSPARENT) { - removeOSDMessage(); - } else { - if (_osdMessageSurface && _osdSurface) { - SDL_Rect dstRect; - dstRect.x = (_osdSurface->w - _osdMessageSurface->w) / 2; - dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2; - dstRect.w = _osdMessageSurface->w; - dstRect.h = _osdMessageSurface->h; - blitOSDMessage(dstRect); - } - } - } -#endif - if (!_overlayVisible) { origSurf = _screen; srcSurf = _tmpscreen; @@ -310,6 +278,10 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() { if (_mouseNeedsRedraw) undrawMouse(); +#ifdef USE_OSD + updateOSD(); +#endif + // Force a full redraw if requested if (_forceFull) { _numDirtyRects = 1; @@ -417,8 +389,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() { drawMouse(); #ifdef USE_OSD - if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) - SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0); + drawOSD(); #endif // Finally, blit all our changes to the screen SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList); |