diff options
author | Paul Gilbert | 2013-03-02 21:47:03 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-03-02 21:47:03 -0500 |
commit | 77eb6f74eb17deda5e629457ca4ec144782fddfe (patch) | |
tree | 88f60a030789c1450bb026eca81c8b09302bfcfe /engines/hopkins | |
parent | 9d8eb97840072ee2c55dabdaf07c05b4db086eea (diff) | |
download | scummvm-rg350-77eb6f74eb17deda5e629457ca4ec144782fddfe.tar.gz scummvm-rg350-77eb6f74eb17deda5e629457ca4ec144782fddfe.tar.bz2 scummvm-rg350-77eb6f74eb17deda5e629457ca4ec144782fddfe.zip |
HOPKINS: Fix to not display dirty rects that are off-screen
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/graphics.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index c7b6904335..0c06ef7f48 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -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(); |