diff options
author | Bastien Bouclet | 2019-10-27 20:18:49 +0100 |
---|---|---|
committer | Bastien Bouclet | 2019-10-27 20:24:05 +0100 |
commit | d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446 (patch) | |
tree | 11b225c1ba1018193a04722a34e1a166c2f40aab /engines | |
parent | 5b00186c67d8a9347b9348b25c63d4c42e5dd3fe (diff) | |
download | scummvm-rg350-d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446.tar.gz scummvm-rg350-d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446.tar.bz2 scummvm-rg350-d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446.zip |
MOHAWK: MYST: Fix misuse of OSystem::fillScreen
OSystem::fillScreen is documented to only accept values between 0 and
255, and thus cannot be sanely used for hi-color graphics. This is
probably an unfortunate leftover of when hi-color support was added.
Fixes videos playing on a white background on the 3DS.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/myst_graphics.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp index 55a92b2b08..b5222c6d91 100644 --- a/engines/mohawk/myst_graphics.cpp +++ b/engines/mohawk/myst_graphics.cpp @@ -892,10 +892,15 @@ void MystGraphics::replaceImageWithRect(uint16 destImage, uint16 sourceImage, co } void MystGraphics::clearScreen() { - if (_vm->getFeatures() & GF_ME) - _vm->_system->fillScreen(_pixelFormat.RGBToColor(0, 0, 0)); - else - _vm->_system->fillScreen(0); + Graphics::Surface *screen = _vm->_system->lockScreen(); + if (screen) { + if (_vm->getFeatures() & GF_ME) + screen->fillRect(_viewport, _pixelFormat.RGBToColor(0, 0, 0)); + else + screen->fillRect(_viewport, 0); + + _vm->_system->unlockScreen(); + } } } // End of namespace Mohawk |