diff options
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/util.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 8166101346..93ec42c7ac 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -324,8 +324,17 @@ void Util::waitEndFrame() { void Util::setScrollOffset(int16 x, int16 y) { processInput(); - _vm->_video->_scrollOffsetX = x >= 0 ? x : _vm->_draw->_scrollOffsetX; - _vm->_video->_scrollOffsetY = y >= 0 ? y : _vm->_draw->_scrollOffsetY; + + if(x >= 0) + _vm->_video->_scrollOffsetX = x; + else + _vm->_video->_scrollOffsetX = _vm->_draw->_scrollOffsetX; + + if(y >= 0) + _vm->_video->_scrollOffsetY = y; + else + _vm->_video->_scrollOffsetY = _vm->_draw->_scrollOffsetY; + _vm->_video->waitRetrace(); } |