diff options
author | 2021-10-20 05:27:31 +1100 | |
---|---|---|
committer | 2021-10-20 05:27:31 +1100 | |
commit | 4e74debb69abecb4f8f2b654040f56f768de9653 (patch) | |
tree | 729b87cdf6d2a8ea58966fd7fb520ba20343ffe1 | |
parent | 2327c5e785fe6be28e515ea7103f6be720362ab5 (diff) |
frontend: Don't show plugin options menu in main menu before start - it doesn't work anyway.
-rw-r--r-- | plugins/autofire/autofire_menu.lua | 10 | ||||
-rw-r--r-- | src/frontend/mame/ui/mainmenu.cpp | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/plugins/autofire/autofire_menu.lua b/plugins/autofire/autofire_menu.lua index 3536800767f..3742747d912 100644 --- a/plugins/autofire/autofire_menu.lua +++ b/plugins/autofire/autofire_menu.lua @@ -56,7 +56,7 @@ local function populate_main_menu(buttons) local input = manager.machine.input local menu = {} menu[#menu + 1] = {_('Autofire buttons'), '', 'off'} - menu[#menu + 1] = {string.format(_('Press %s to delete'), input:seq_name(ioport:type_seq(ioport:token_to_input_type("UI_CLEAR")))), '', 'off'} + menu[#menu + 1] = {string.format(_('Press %s to delete'), input:seq_name(ioport:type_seq(ioport:token_to_input_type('UI_CLEAR')))), '', 'off'} menu[#menu + 1] = {'---', '', ''} header_height = #menu @@ -65,7 +65,7 @@ local function populate_main_menu(buttons) local rate = 60 / (button.on_frames + button.off_frames) -- Round to two decimal places rate = math.floor(rate * 100) / 100 - local text = string.format(_('%s [%d Hz]'), _p("input-name", button.button.name), rate) + local text = string.format(_('%s [%d Hz]'), _p('input-name', button.button.name), rate) local subtext = input:seq_name(button.key) menu[#menu + 1] = {text, subtext, ''} end @@ -100,7 +100,7 @@ end -- Add/edit menus (mostly identical) local function populate_configure_menu(menu) - local button_name = current_button.button and _p("input-name", current_button.button.name) or _('NOT SET') + local button_name = current_button.button and _p('input-name', current_button.button.name) or _('NOT SET') local key_name = current_button.key and manager.machine.input:seq_name(current_button.key) or _('NOT SET') menu[#menu + 1] = {_('Input'), button_name, ''} menu[#menu + 1] = {_('Hotkey'), key_name, ''} @@ -120,7 +120,7 @@ local function poll_for_hotkey() while (not poller:poll()) and (poller.modified or (os.clock() < time + 1)) do if poller.modified then if not poller.valid then - manager.machine:popmessage(_("Invalid sequence entered")) + manager.machine:popmessage(_('Invalid sequence entered')) clearmsg = false break end @@ -253,7 +253,7 @@ local function populate_button_menu() end -- TODO: group by device so we can sort table.sort(inputs, function(x, y) return x.ioport_field.name < y.ioport_field.name end) for i, input in pairs(inputs) do - menu[header_height + i] = { _p("input-name", input.ioport_field.name), '', '' } + menu[header_height + i] = { _p('input-name', input.ioport_field.name), '', '' } end content_height = #menu diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp index 73084728edb..a50c346a1fe 100644 --- a/src/frontend/mame/ui/mainmenu.cpp +++ b/src/frontend/mame/ui/mainmenu.cpp @@ -156,12 +156,14 @@ void menu_main::populate(float &customtop, float &custombottom) if (machine().options().cheat()) item_append(_("Cheat"), 0, (void *)CHEAT); - if (machine().options().plugins() && !mame_machine_manager::instance()->lua()->get_menu().empty()) - item_append(_("Plugin Options"), 0, (void *)PLUGINS); - if (machine().phase() >= machine_phase::RESET) + { + if (machine().options().plugins() && !mame_machine_manager::instance()->lua()->get_menu().empty()) + item_append(_("Plugin Options"), 0, (void *)PLUGINS); + if (mame_machine_manager::instance()->lua()->call_plugin_check<const char *>("data_list", "", true)) item_append(_("External DAT View"), 0, (void *)EXTERNAL_DATS); + } item_append(menu_item_type::SEPARATOR); |