From 2e898739bc8c4d5791923372c16d25633b0dc968 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 23 Apr 2016 23:14:35 +0200 Subject: WAGE: Clip windows to the screen dimensions --- engines/wage/macwindowmanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/wage/macwindowmanager.cpp') 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()); } } -- cgit v1.2.3