diff options
Diffstat (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.cpp')
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index fdf21010e7..f4a466d740 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1091,7 +1091,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() { dstRect.y = (_osdSurface->h - _osdMessageSurface->h) / 2; dstRect.w = _osdMessageSurface->w; dstRect.h = _osdMessageSurface->h; - blitOSDMessage(dstRect); + blitOSDMessage(dstRect); } } } @@ -1199,7 +1199,8 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() { drawMouse(); #ifdef USE_OSD - SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0); + if (_osdMessageAlpha != SDL_ALPHA_TRANSPARENT) + SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0); #endif #ifdef USE_SDL_DEBUG_FOCUSRECT @@ -2177,13 +2178,13 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) { SDL_SWSURFACE | SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, width, height, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF ); - + // Lock the surface if (SDL_LockSurface(_osdMessageSurface)) error("displayMessageOnOSD: SDL_LockSurface failed: %s", SDL_GetError()); // Draw a dark gray rect - // TODO: Rounded corners ? Border? + // TODO: Rounded corners ? Border? SDL_FillRect(_osdMessageSurface, nullptr, SDL_MapRGB(_osdMessageSurface->format, 64, 64, 64)); Graphics::Surface dst; @@ -2257,7 +2258,7 @@ void SurfaceSdlGraphicsManager::copyRectToOSD(const void *buf, int pitch, int x, } void SurfaceSdlGraphicsManager::clearOSD() { - assert(_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends @@ -2291,7 +2292,7 @@ void SurfaceSdlGraphicsManager::removeOSDMessage() { osdRect.w = _osdMessageSurface->w; osdRect.h = _osdMessageSurface->h; SDL_FillRect(_osdSurface, &osdRect, kOSDColorKey); - SDL_FreeSurface(_osdMessageSurface); + SDL_FreeSurface(_osdMessageSurface); } _osdMessageSurface = NULL; |