PEGASUS: Clamp the dirty rect to the screen size
This commit is contained in:
parent
97072b5d4b
commit
cb500d147e
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue