diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 12 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 96b74ecba7..1dde92af72 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -396,6 +396,18 @@ void OSystem_SDL::loadGFXMode() { if (_overlayscreen == NULL) error("allocating _overlayscreen failed"); + _overlayFormat.bytesPerPixel = _overlayscreen->format->BytesPerPixel; + + _overlayFormat.rLoss = _overlayscreen->format->Rloss; + _overlayFormat.gLoss = _overlayscreen->format->Gloss; + _overlayFormat.bLoss = _overlayscreen->format->Bloss; + _overlayFormat.aLoss = _overlayscreen->format->Aloss; + + _overlayFormat.rShift = _overlayscreen->format->Rshift; + _overlayFormat.gShift = _overlayscreen->format->Gshift; + _overlayFormat.bShift = _overlayscreen->format->Bshift; + _overlayFormat.aShift = _overlayscreen->format->Ashift; + _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth + 3, _overlayHeight + 3, 16, _hwscreen->format->Rmask, diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 602cf8d24d..8c89af05a7 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -176,6 +176,7 @@ public: void deleteMutex(MutexRef mutex); // Overlay + virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; } virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); @@ -246,6 +247,7 @@ protected: SDL_Surface *_overlayscreen; int _overlayWidth, _overlayHeight; bool _overlayVisible; + Graphics::PixelFormat _overlayFormat; // Audio int _samplesPerSec; |