aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp')
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp40
1 files changed, 6 insertions, 34 deletions
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index a69cba24ee..6a920e9eae 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -290,38 +290,6 @@ void LinuxmotoSdlGraphicsManager::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;
@@ -343,6 +311,10 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() {
if (_mouseNeedsRedraw)
undrawMouse();
+#ifdef USE_OSD
+ updateOSD();
+#endif
+
// Force a full redraw if requested
if (_forceFull) {
_numDirtyRects = 1;
@@ -451,9 +423,9 @@ void LinuxmotoSdlGraphicsManager::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);
}