aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/pegasus/graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/pegasus/graphics.cpp b/engines/pegasus/graphics.cpp
index 9431293aa1..2891f216d5 100644
--- a/engines/pegasus/graphics.cpp
+++ b/engines/pegasus/graphics.cpp
@@ -197,6 +197,10 @@ void GraphicsManager::invalRect(const Common::Rect &rect) {
// Expand our dirty rect to include rect
_dirtyRect.extend(rect);
}
+
+ // Sanity check: clip our rect to the screen
+ _dirtyRect.right = MIN<int>(640, _dirtyRect.right);
+ _dirtyRect.bottom = MIN<int>(480, _dirtyRect.bottom);
}
void GraphicsManager::addDisplayElement(DisplayElement *newElement) {