Skip to content
Permalink
Browse files

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.

(cherry picked from commit d810bb7)
  • Loading branch information...
bgK committed Oct 27, 2019
1 parent be05540 commit e4ef9d9379e4b48e6b7f1ef3316abed560ebe5fe
Showing with 9 additions and 4 deletions.
  1. +9 −4 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

0 comments on commit e4ef9d9

Please sign in to comment.
You can’t perform that action at this time.