diff options
author | Martin Kiewitz | 2010-07-06 14:10:09 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-06 14:10:09 +0000 |
commit | a7cd1534c6d3a325e36db42314e22ff3d8bdc8dd (patch) | |
tree | 7e1e60e9e5047e94c5af022c8541e1bcea3bc9e5 /engines/sci/graphics/menu.cpp | |
parent | c89fe5f6d56b6d6e11b7d642e85633bc86098ce8 (diff) | |
download | scummvm-rg350-a7cd1534c6d3a325e36db42314e22ff3d8bdc8dd.tar.gz scummvm-rg350-a7cd1534c6d3a325e36db42314e22ff3d8bdc8dd.tar.bz2 scummvm-rg350-a7cd1534c6d3a325e36db42314e22ff3d8bdc8dd.zip |
SCI: fix regression of r50721 - pausing/resuming only on actual menu usage
svn-id: r50724
Diffstat (limited to 'engines/sci/graphics/menu.cpp')
-rw-r--r-- | engines/sci/graphics/menu.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index d85d4456fc..f959ffb3a5 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -382,7 +382,7 @@ void GfxMenu::calculateMenuAndItemWidth() { } } -reg_t GfxMenu::kernelSelect(reg_t eventObject) { +reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) { int16 eventType = readSelectorValue(_segMan, eventObject, SELECTOR(type)); int16 keyPress, keyModifier; Common::Point mousePosition; @@ -407,9 +407,9 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject) { case 0: break; case SCI_KEY_ESC: - interactiveShowMouse(); + interactiveStart(pauseSound); itemEntry = interactiveWithKeyboard(); - interactiveRestoreMouse(); + interactiveEnd(pauseSound); forceClaimed = true; break; default: @@ -445,9 +445,9 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject) { case SCI_EVENT_MOUSE_PRESS: mousePosition = _cursor->getPosition(); if (mousePosition.y < 10) { - interactiveShowMouse(); + interactiveStart(pauseSound); itemEntry = interactiveWithMouse(); - interactiveRestoreMouse(); + interactiveEnd(pauseSound); forceClaimed = true; } break; @@ -632,12 +632,16 @@ void GfxMenu::invertMenuSelection(uint16 itemId) { _paint16->bitsShow(itemRect); } -void GfxMenu::interactiveShowMouse() { +void GfxMenu::interactiveStart(bool pauseSound) { _mouseOldState = _cursor->isVisible(); _cursor->kernelShow(); + if (pauseSound) + g_sci->_soundCmd->pauseAll(true); } -void GfxMenu::interactiveRestoreMouse() { +void GfxMenu::interactiveEnd(bool pauseSound) { + if (pauseSound) + g_sci->_soundCmd->pauseAll(false); if (!_mouseOldState) _cursor->kernelHide(); } |