diff options
author | Narek Mailian | 2013-08-05 17:59:36 +0200 |
---|---|---|
committer | Narek Mailian | 2013-08-08 08:35:08 +0200 |
commit | 1f1d35bd3d31fe3430b9b5227b6127cfd52e52a2 (patch) | |
tree | 68f67447159105370896a3e6f11accf9b0a647a8 /gui/ThemeEngine.cpp | |
parent | f545a2f08fc8989fa22726ce0b74e03ece099300 (diff) | |
download | scummvm-rg350-1f1d35bd3d31fe3430b9b5227b6127cfd52e52a2.tar.gz scummvm-rg350-1f1d35bd3d31fe3430b9b5227b6127cfd52e52a2.tar.bz2 scummvm-rg350-1f1d35bd3d31fe3430b9b5227b6127cfd52e52a2.zip |
GRAPHICS: Allow VectorRenderer and ThemeEngine to init with 4BPP
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"); } |