diff options
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); |