aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorDreammaster2013-02-18 23:30:59 -0500
committerDreammaster2013-02-18 23:30:59 -0500
commitf92154dbe19ecca876ffcbeca1379c1651812fb0 (patch)
treec54716428f095580d9de79bc8a0e7f48d4835d40 /engines/hopkins
parent71f70158e77201bdc42d3393fa11f78fe4e98ce0 (diff)
downloadscummvm-rg350-f92154dbe19ecca876ffcbeca1379c1651812fb0.tar.gz
scummvm-rg350-f92154dbe19ecca876ffcbeca1379c1651812fb0.tar.bz2
scummvm-rg350-f92154dbe19ecca876ffcbeca1379c1651812fb0.zip
HOPKINS: Changed WinScan to use actual screen pitch
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/graphics.cpp10
1 files changed, 7 insertions, 3 deletions
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;
+ }
+ }
}
/**