diff options
author | Andrei Prykhodko | 2018-07-26 05:18:04 +0300 |
---|---|---|
committer | Andrei Prykhodko | 2018-07-26 05:18:04 +0300 |
commit | f447ccb3907a03e1f4a2147c4b10e75311d3dd4a (patch) | |
tree | b252075a60fc69c5f4f727e437c32317c15de84a | |
parent | cdd5717ce0ed596936d818036264684e3503aab2 (diff) | |
download | scummvm-rg350-f447ccb3907a03e1f4a2147c4b10e75311d3dd4a.tar.gz scummvm-rg350-f447ccb3907a03e1f4a2147c4b10e75311d3dd4a.tar.bz2 scummvm-rg350-f447ccb3907a03e1f4a2147c4b10e75311d3dd4a.zip |
GRAPHICS: MACGUI: fixed restoring screen
-rw-r--r-- | graphics/macgui/macmenu.cpp | 4 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index b50c583aac..ac64f0cdae 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -674,7 +674,7 @@ bool MacMenu::mouseMove(int x, int y) { _isVisible = false; if (_wm->_mode & kWMModalMenuMode) { _wm->pauseEngine(false); - _wm->_screen = _wm->_screenCopy; // restore screen + *_wm->_screen = *_wm->_screenCopy; // restore screen g_system->copyRectToScreen(_wm->_screenCopy->getBasePtr(0, 0), _wm->_screenCopy->pitch, 0, 0, _wm->_screenCopy->w, _wm->_screenCopy->h); } } @@ -689,7 +689,7 @@ bool MacMenu::mouseRelease(int x, int y) { if (_wm->_mode & kWMModalMenuMode) { _wm->pauseEngine(false); - _wm->_screen = _wm->_screenCopy; // restore screen + *_wm->_screen = *_wm->_screenCopy; // restore screen g_system->copyRectToScreen(_wm->_screenCopy->getBasePtr(0, 0), _wm->_screenCopy->pitch, 0, 0, _wm->_screenCopy->w, _wm->_screenCopy->h); } diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 737f9085d8..e37332c814 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -341,7 +341,10 @@ static void menuTimerHandler(void *refCon) { if (wm->_menuHotzone.contains(wm->_lastMousePos)) { wm->activateMenu(); if (wm->_mode & kWMModalMenuMode) { - wm->_screenCopy = new ManagedSurface(*wm->_screen); // Create a copy + if (!wm->_screenCopy) + wm->_screenCopy = new ManagedSurface(*wm->_screen); // Create a copy + else + *wm->_screenCopy = *wm->_screen; wm->pauseEngine(true); } } |