From d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 27 Oct 2019 20:18:49 +0100 Subject: 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. --- engines/mohawk/myst_graphics.cpp | 13 +++++++++---- 1 file 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 -- cgit v1.2.3