diff options
author | 2021-10-20 02:03:43 +1100 | |
---|---|---|
committer | 2021-10-20 02:03:43 +1100 | |
commit | 0a9ea09a9a328884b61ce57c2e3b51705da50467 (patch) | |
tree | 98153d6f2244b0053d9c1894b5c71277fb18522d /src/frontend/mame/ui/pluginopt.cpp | |
parent | 9e7779bdd5c17a847ed4c06a9b7e68a39ec6576b (diff) |
Tie up a few loose ends:
debugger: Octal cheats for octal address spaces.
frontend: Pass events for automatically generated menu items to the
plugin - they will have index zero.
frontend: Don't try calling the data plugin from the main menu if the
system isn't starting yet - doing so will prevent the data plugin from
loading at all.
Diffstat (limited to 'src/frontend/mame/ui/pluginopt.cpp')
-rw-r--r-- | src/frontend/mame/ui/pluginopt.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/frontend/mame/ui/pluginopt.cpp b/src/frontend/mame/ui/pluginopt.cpp index 83faaa43603..d36503cdcee 100644 --- a/src/frontend/mame/ui/pluginopt.cpp +++ b/src/frontend/mame/ui/pluginopt.cpp @@ -72,40 +72,40 @@ void menu_plugin_opt::handle() { const event *menu_event = process(0); - if (menu_event && uintptr_t(menu_event->itemref)) + if (menu_event) { std::string key; switch (menu_event->iptkey) { - case IPT_UI_UP: - key = "up"; - break; - case IPT_UI_DOWN: - key = "down"; - break; - case IPT_UI_LEFT: - key = "left"; - break; - case IPT_UI_RIGHT: - key = "right"; - break; - case IPT_UI_SELECT: - key = "select"; - break; - case IPT_UI_DISPLAY_COMMENT: - key = "comment"; - break; - case IPT_UI_CLEAR: - key = "clear"; - break; - case IPT_UI_CANCEL: - key = "cancel"; - break; - case IPT_SPECIAL: - key = std::to_string((u32)menu_event->unichar); - break; - default: - return; + case IPT_UI_UP: + key = "up"; + break; + case IPT_UI_DOWN: + key = "down"; + break; + case IPT_UI_LEFT: + key = "left"; + break; + case IPT_UI_RIGHT: + key = "right"; + break; + case IPT_UI_SELECT: + key = "select"; + break; + case IPT_UI_DISPLAY_COMMENT: + key = "comment"; + break; + case IPT_UI_CLEAR: + key = "clear"; + break; + case IPT_UI_CANCEL: + key = "cancel"; + break; + case IPT_SPECIAL: + key = std::to_string((u32)menu_event->unichar); + break; + default: + return; } if (mame_machine_manager::instance()->lua()->menu_callback(m_menu, uintptr_t(menu_event->itemref), key)) reset(reset_options::REMEMBER_REF); |