[Scummvm-git-logs] scummvm master -> d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446

bgK bastien.bouclet at gmail.com
Sun Oct 27 20:28:16 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d810bb7451 MOHAWK: MYST: Fix misuse of OSystem::fillScreen


Commit: d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446
    https://github.com/scummvm/scummvm/commit/d810bb7451ba5335a3f3ff7cb4b7b8ebd529b446
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-10-27T20:24:05+01:00

Commit Message:
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.

Changed paths:
    engines/mohawk/myst_graphics.cpp


diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp
index 55a92b2..b5222c6 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





More information about the Scummvm-git-logs mailing list