diff options
author | Eugene Sandulenko | 2017-08-18 10:17:29 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-18 10:17:52 +0200 |
commit | bc8b952d7169820213551dcdacccbebb66e1d84a (patch) | |
tree | b909d3f1d0649010cbf2246c8ce95f81cc45d035 | |
parent | 9ee81ad12718a355b210df838436dbd4f4384253 (diff) | |
download | scummvm-rg350-bc8b952d7169820213551dcdacccbebb66e1d84a.tar.gz scummvm-rg350-bc8b952d7169820213551dcdacccbebb66e1d84a.tar.bz2 scummvm-rg350-bc8b952d7169820213551dcdacccbebb66e1d84a.zip |
GRAPHICS: MACGUI: Perform sanity checks before blitting
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 9a3e711c19..8eaf8e9f5b 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -289,8 +289,10 @@ void MacWindowManager::draw() { Common::Rect clip(w->getDimensions().left - 2, w->getDimensions().top - 2, w->getDimensions().right - 2, w->getDimensions().bottom - 2); clip.clip(_screen->getBounds()); + clip.clip(Common::Rect(0, 0, g_system->getWidth() - 1, g_system->getHeight() - 1)); - g_system->copyRectToScreen(_screen->getBasePtr(clip.left, clip.top), _screen->pitch, clip.left, clip.top, clip.width(), clip.height()); + if (!clip.isEmpty()) + g_system->copyRectToScreen(_screen->getBasePtr(clip.left, clip.top), _screen->pitch, clip.left, clip.top, clip.width(), clip.height()); } } |