Skip to content

Commit

Permalink
PEGASUS: Clamp the dirty rect to the screen size
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Sep 22, 2011
1 parent 97072b5 commit cb500d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/pegasus/graphics.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit cb500d1

Please sign in to comment.