aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/director.cpp2
-rw-r--r--graphics/macgui/macmenu.cpp2
-rw-r--r--graphics/macgui/macwindowmanager.cpp18
3 files changed, 14 insertions, 8 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 5d9c7c4ba4..90f0c3faf4 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -124,7 +124,7 @@ Common::Error DirectorEngine::run() {
_macBinary = nullptr;
_soundManager = nullptr;
- _wm = new Graphics::MacWindowManager;
+ _wm = new Graphics::MacWindowManager(Graphics::kWMModalMenuMode);
_lingo = new Lingo(this);
_soundManager = new DirectorSound();
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");
}
}