From f92154dbe19ecca876ffcbeca1379c1651812fb0 Mon Sep 17 00:00:00 2001 From: Dreammaster Date: Mon, 18 Feb 2013 23:30:59 -0500 Subject: HOPKINS: Changed WinScan to use actual screen pitch --- engines/hopkins/graphics.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'engines/hopkins') diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 0e2df5e04a..1009b1b3ed 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -112,7 +112,8 @@ void GraphicsManager::setGraphicalMode(int width, int height) { _screenWidth = width; _screenHeight = height; - WinScan = width * 2; // Refactor me + // Clear the screen pitch. This will be set on the first lockScreen call + WinScan = 0; PAL_PIXELS = SD_PIXELS; _lineNbr = width; @@ -128,9 +129,12 @@ void GraphicsManager::setGraphicalMode(int width, int height) { */ void GraphicsManager::lockScreen() { if (!_skipVideoLockFl) { - if (_lockCounter++ == 0) + if (_lockCounter++ == 0) { _videoPtr = g_system->lockScreen(); - } + if (WinScan == 0) + WinScan = _videoPtr->pitch; + } + } } /** -- cgit v1.2.3