aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macmenu.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index 839404de81..91c01e0983 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -231,19 +231,15 @@ MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources &exe, MacWindowManager
if (flags & kPopUp) {
if (depth == 0) {
menu->addMenuItem(readUnicodeString(menuData));
-
- MacMenuSubMenu *submenu = menu->addSubMenu(nullptr);
- menus.push(submenu);
} else {
- MacMenuSubMenu *submenu = menu->addSubMenu(menus.size() ? menus.top() : nullptr);
-
- menus.push(submenu);
-
Common::U32String name = readUnicodeString(menuData);
- menu->addSubMenuItem(submenu, name, action);
+ menu->addSubMenuItem(menus.top(), name, action);
action++;
}
+ MacMenuSubMenu *submenu = menu->addSubMenu(menus.size() ? menus.top() : nullptr);
+ menus.push(submenu);
+
if (lastPopUp) {
lastPopUpCopy = lastPopUp;
}