diff options
Diffstat (limited to 'backends/graphics/gph/gph-graphics.cpp')
-rw-r--r-- | backends/graphics/gph/gph-graphics.cpp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 65cb3d1d65..a19512110f 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -277,26 +277,6 @@ void GPHGraphicsManager::internUpdateScreen() { _forceFull = true; } -#ifdef USE_OSD - // OSD visible (i.e. non-transparent)? - if (_osdAlpha != SDL_ALPHA_TRANSPARENT) { - // Updated alpha value - const int diff = SDL_GetTicks() - _osdFadeStartTime; - if (diff > 0) { - if (diff >= kOSDFadeOutDuration) { - // Back to full transparency - _osdAlpha = SDL_ALPHA_TRANSPARENT; - } else { - // Do a linear fade out... - const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100; - _osdAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; - } - SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha); - _forceFull = true; - } - } -#endif - if (!_overlayVisible) { origSurf = _screen; srcSurf = _tmpscreen; @@ -319,6 +299,10 @@ void GPHGraphicsManager::internUpdateScreen() { if (_mouseNeedsRedraw) undrawMouse(); +#ifdef USE_OSD + updateOSD(); +#endif + // Force a full redraw if requested if (_forceFull) { _numDirtyRects = 1; @@ -428,10 +412,9 @@ void GPHGraphicsManager::internUpdateScreen() { drawMouse(); #ifdef USE_OSD - if (_osdAlpha != SDL_ALPHA_TRANSPARENT) { - SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0); - } + drawOSD(); #endif + // Finally, blit all our changes to the screen SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList); } @@ -459,7 +442,7 @@ void GPHGraphicsManager::hideOverlay() { bool GPHGraphicsManager::loadGFXMode() { - // We don't offer anything other than fullscreen on GPH devices so let’s not even pretend. + // We don't offer anything other than fullscreen on GPH devices so let's not even pretend. _videoMode.fullscreen = true; // Set the hardware stats to match the LCD. |