diff options
author | RichieSams | 2013-09-16 00:03:35 -0500 |
---|---|---|
committer | RichieSams | 2013-09-16 00:03:35 -0500 |
commit | cdd793ed224579870daa73061ff0478e179ff21d (patch) | |
tree | d8f67e072992571cfd8b08450ac19bf256b1e81d /engines | |
parent | 7ce6823158122d0b1922e675eccf31fd5382f9ef (diff) | |
download | scummvm-rg350-cdd793ed224579870daa73061ff0478e179ff21d.tar.gz scummvm-rg350-cdd793ed224579870daa73061ff0478e179ff21d.tar.bz2 scummvm-rg350-cdd793ed224579870daa73061ff0478e179ff21d.zip |
ZVISION: Check is a dirty rect is empty before extending it
So extends dont extend from 0,0
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/render_manager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index c25f670acf..13e8cba240 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -324,7 +324,11 @@ void RenderManager::copyRectToWorkingWindow(const uint16 *buffer, int32 destX, i sourceOffset += imageWidth; } - _workingWindowDirtyRect.extend(Common::Rect(destX, destY, destX + width, destY + height)); + if (_workingWindowDirtyRect.isEmpty()) { + _workingWindowDirtyRect = Common::Rect(destX, destY, destX + width, destY + height); + } else { + _workingWindowDirtyRect.extend(Common::Rect(destX, destY, destX + width, destY + height)); + } // TODO: Remove this from release. It's here to make sure code that uses this function clips their destinations correctly assert(_workingWindowDirtyRect.width() <= _workingWidth && _workingWindowDirtyRect.height() <= _workingHeight); |