diff options
-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); } } |