mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-19 16:18:45 +00:00
HOPKINS: Fix to not display dirty rects that are off-screen
This commit is contained in:
parent
9d8eb97840
commit
77eb6f74eb
@ -1171,9 +1171,12 @@ void GraphicsManager::displayDirtyRects() {
|
||||
unlockScreen();
|
||||
}
|
||||
|
||||
byte *srcP = _videoPtr + WinScan * dstRect.top + (dstRect.left * 2);
|
||||
g_system->copyRectToScreen(srcP, WinScan, dstRect.left, dstRect.top,
|
||||
dstRect.width(), dstRect.height());
|
||||
// If it's a valid rect, then copy it over
|
||||
if (dstRect.isValidRect() && dstRect.width() > 0 && dstRect.height() > 0) {
|
||||
byte *srcP = _videoPtr + WinScan * dstRect.top + (dstRect.left * 2);
|
||||
g_system->copyRectToScreen(srcP, WinScan, dstRect.left, dstRect.top,
|
||||
dstRect.width(), dstRect.height());
|
||||
}
|
||||
}
|
||||
|
||||
unlockScreen();
|
||||
|
Loading…
Reference in New Issue
Block a user