diff options
author | Eugene Sandulenko | 2019-10-03 14:00:15 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-10-03 14:00:15 +0200 |
commit | b5573c8e2af74079cbe2583f75f5dfe3220a4376 (patch) | |
tree | 92151b181b7d609bc8fa04d06194539d3f8ba2ca /graphics/macgui | |
parent | 890adf6e3ae40d2b9321fe0eba3907c74ace9fd9 (diff) | |
download | scummvm-rg350-b5573c8e2af74079cbe2583f75f5dfe3220a4376.tar.gz scummvm-rg350-b5573c8e2af74079cbe2583f75f5dfe3220a4376.tar.bz2 scummvm-rg350-b5573c8e2af74079cbe2583f75f5dfe3220a4376.zip |
GRAPHICS: MACGUI: Fix nested menus command processing
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 114f56ab03..917e1ff8f1 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -922,13 +922,13 @@ bool MacMenu::mouseRelease(int x, int y) { g_system->copyRectToScreen(_wm->_screenCopy->getBasePtr(0, 0), _wm->_screenCopy->pitch, 0, 0, _wm->_screenCopy->w, _wm->_screenCopy->h); } - if (_activeItem != -1 && _activeSubItem != -1 && _items[_activeItem]->submenu->subitems[_activeSubItem]->enabled) { - if (_items[_activeItem]->submenu->subitems[_activeSubItem]->unicode) { - (*_unicodeccallback)(_items[_activeItem]->submenu->subitems[_activeSubItem]->action, - _items[_activeItem]->submenu->subitems[_activeSubItem]->unicodeText, _cdata); + if (_activeItem != -1 && _activeSubItem != -1 && _menustack.back()->subitems[_activeSubItem]->enabled) { + if (_menustack.back()->subitems[_activeSubItem]->unicode) { + (*_unicodeccallback)(_menustack.back()->subitems[_activeSubItem]->action, + _menustack.back()->subitems[_activeSubItem]->unicodeText, _cdata); } else { - (*_ccallback)(_items[_activeItem]->submenu->subitems[_activeSubItem]->action, - _items[_activeItem]->submenu->subitems[_activeSubItem]->text, _cdata); + (*_ccallback)(_menustack.back()->subitems[_activeSubItem]->action, + _menustack.back()->subitems[_activeSubItem]->text, _cdata); } } |