diff options
author | Eugene Sandulenko | 2019-10-04 16:47:42 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-10-04 16:47:42 +0200 |
commit | 28ac30b4fcd58a75f423e3c62a09b2294ad4b360 (patch) | |
tree | 2ddb295ed8e1c5fea8f96571316c8e7d920ed2fc /graphics/macgui | |
parent | 15b44e9a1000d3f785fe7c459b9175bd4b496516 (diff) | |
download | scummvm-rg350-28ac30b4fcd58a75f423e3c62a09b2294ad4b360.tar.gz scummvm-rg350-28ac30b4fcd58a75f423e3c62a09b2294ad4b360.tar.bz2 scummvm-rg350-28ac30b4fcd58a75f423e3c62a09b2294ad4b360.zip |
GRAPHICS: MACGUI: Properly process action menu ids from PE exe
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 62889c287c..58ae0f89e8 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -215,7 +215,6 @@ MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources &exe, MacWindowManager int depth = 0; int curMenuItemId = 0; - int action = 0; bool lastPopUp = false; while (depth >= 0) { uint16 flags = menuData->readUint16LE(); @@ -224,8 +223,7 @@ MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources &exe, MacWindowManager menu->addMenuItem(nullptr, readUnicodeString(menuData)); } else { Common::U32String name = readUnicodeString(menuData); - menu->addMenuItem(menus.top(), name, action, 0, 0, !(flags & kGrayed)); - action++; + menu->addMenuItem(menus.top(), name, -1, 0, 0, !(flags & kGrayed)); } MacMenuSubMenu *submenu = menu->addSubMenu(menus.size() ? menus.top() : nullptr); @@ -236,7 +234,7 @@ MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources &exe, MacWindowManager depth++; } else { - menuData->readUint16LE(); // menu id + int action = menuData->readUint16LE(); Common::U32String name = readUnicodeString(menuData); if (depth > 0) { menu->addMenuItem(menus.top(), name, action, 0, 0, !(flags & kGrayed)); |