diff options
author | Bastien Bouclet | 2017-07-15 07:23:58 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-07-15 07:23:58 +0200 |
commit | a7900f57564df5bc0a3539a6a26ebed3c41e7435 (patch) | |
tree | 2e19d923c07357c9c9a21146cbd1cf04002eaa77 | |
parent | ef42fd3476eb5da3a832d09b35e1cf539f8c2b95 (diff) | |
download | scummvm-rg350-a7900f57564df5bc0a3539a6a26ebed3c41e7435.tar.gz scummvm-rg350-a7900f57564df5bc0a3539a6a26ebed3c41e7435.tar.bz2 scummvm-rg350-a7900f57564df5bc0a3539a6a26ebed3c41e7435.zip |
MOHAWK: Riven: Stop sending empty rects when drawing transitions
Fixes #9947.
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 6324af562a..270b0c88ca 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -228,11 +228,15 @@ public: } } - _system->copyRectToScreen(_effectScreen->getBasePtr(oldX, oldY), _effectScreen->pitch, - oldArea.left, oldArea.top, oldArea.width(), oldArea.height()); + if (!oldArea.isEmpty()) { + _system->copyRectToScreen(_effectScreen->getBasePtr(oldX, oldY), _effectScreen->pitch, + oldArea.left, oldArea.top, oldArea.width(), oldArea.height()); + } - _system->copyRectToScreen(_mainScreen->getBasePtr(newX, newY), _mainScreen->pitch, - newArea.left, newArea.top, newArea.width(), newArea.height()); + if (!newArea.isEmpty()) { + _system->copyRectToScreen(_mainScreen->getBasePtr(newX, newY), _mainScreen->pitch, + newArea.left, newArea.top, newArea.width(), newArea.height()); + } if (newArea == _rect) { _effectScreen->copyRectToSurface(*_mainScreen, _rect.left, _rect.top, _rect); |