diff options
Diffstat (limited to 'gui/ThemeEngine.cpp')
-rw-r--r-- | gui/ThemeEngine.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index b7199fbf68..561c0244a2 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -498,9 +498,13 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) { #ifndef DISABLE_FANCY_THEMES case kGfxAntialias: #endif - _bytesPerPixel = sizeof(uint16); - break; - + if (g_system->getOverlayFormat().bytesPerPixel == 4) { + _bytesPerPixel = sizeof(uint32); + break; + } else if (g_system->getOverlayFormat().bytesPerPixel == 2) { + _bytesPerPixel = sizeof(uint16); + break; + } default: error("Invalid graphics mode"); } |