diff options
author | Eugene Sandulenko | 2019-12-16 11:09:15 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-12-16 11:09:15 +0100 |
commit | f724e672f8b65e4be74b73711e996e8b1bb78291 (patch) | |
tree | 4cacebf3d4c2fbf2a2d825d1dccb97aaaa7a8af4 /graphics/macgui | |
parent | f438d0c5b20d5373b44287948fc5f6c1bfb0e7ec (diff) | |
download | scummvm-rg350-f724e672f8b65e4be74b73711e996e8b1bb78291.tar.gz scummvm-rg350-f724e672f8b65e4be74b73711e996e8b1bb78291.tar.bz2 scummvm-rg350-f724e672f8b65e4be74b73711e996e8b1bb78291.zip |
GRAPHICS: MACGUI: Save background on menu activation
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 2 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 18 |
2 files changed, 13 insertions, 7 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index a6788007ed..54b9c9e91f 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -959,6 +959,8 @@ bool MacMenu::mouseClick(int x, int y) { _contentIsDirty = true; _wm->setFullRefresh(true); + _wm->activateMenu(); + return true; } } diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 900c06dff5..f48a2faf74 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -239,6 +239,15 @@ void MacWindowManager::activateMenu() { if (!_menu) return; + if (_mode & kWMModalMenuMode) { + warning("HHERE"); + if (!_screenCopy) + _screenCopy = new ManagedSurface(*_screen); // Create a copy + else + *_screenCopy = *_screen; + pauseEngine(true); + } + _menu->setVisible(true); } @@ -355,13 +364,6 @@ static void menuTimerHandler(void *refCon) { if (wm->_menuHotzone.contains(wm->_lastMousePos)) { wm->activateMenu(); - if (wm->_mode & kWMModalMenuMode) { - if (!wm->_screenCopy) - wm->_screenCopy = new ManagedSurface(*wm->_screen); // Create a copy - else - *wm->_screenCopy = *wm->_screen; - wm->pauseEngine(true); - } } wm->_menuTimerActive = false; @@ -539,6 +541,8 @@ void MacWindowManager::passPalette(const byte *pal, uint size) { void MacWindowManager::pauseEngine(bool pause) { if (_engineP && _pauseEngineCallback) { _pauseEngineCallback(_engineP, pause); + } else { + warning("MacWindowManager::pauseEngine(): no pauseEngineCallback is set"); } } |