aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/macwindowmanager.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-23 23:14:35 +0200
committerEugene Sandulenko2016-04-23 23:14:35 +0200
commit2e898739bc8c4d5791923372c16d25633b0dc968 (patch)
tree29af8d4c16862e56a887c6e1fc79392c0972ddd1 /engines/wage/macwindowmanager.cpp
parent99fbda5842c331a1431172d285641fc2e8ce3257 (diff)
downloadscummvm-rg350-2e898739bc8c4d5791923372c16d25633b0dc968.tar.gz
scummvm-rg350-2e898739bc8c4d5791923372c16d25633b0dc968.tar.bz2
scummvm-rg350-2e898739bc8c4d5791923372c16d25633b0dc968.zip
WAGE: Clip windows to the screen dimensions
Diffstat (limited to 'engines/wage/macwindowmanager.cpp')
-rw-r--r--engines/wage/macwindowmanager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/wage/macwindowmanager.cpp b/engines/wage/macwindowmanager.cpp
index 8ce39b25b5..c8454dda87 100644
--- a/engines/wage/macwindowmanager.cpp
+++ b/engines/wage/macwindowmanager.cpp
@@ -109,9 +109,10 @@ void MacWindowManager::draw() {
if (w->draw(_screen, _fullRefresh)) {
w->setDirty(false);
- g_system->copyRectToScreen(_screen->getBasePtr(w->getDimensions().left - 2, w->getDimensions().top - 2),
- _screen->pitch, w->getDimensions().left - 2, w->getDimensions().top - 2,
- w->getDimensions().width(), w->getDimensions().height());
+ Common::Rect clip(w->getDimensions().left - 2, w->getDimensions().top - 2, w->getDimensions().right - 2, w->getDimensions().bottom - 2);
+ clip.clip(_screen->getBounds());
+
+ g_system->copyRectToScreen(_screen->getBasePtr(clip.left, clip.top), _screen->pitch, clip.left, clip.top, clip.width(), clip.height());
}
}