Skip to content

Commit 7be2cf6

Browse files
committed
Make ROM reload shortcut available everywhere
1 parent 6cb068d commit 7be2cf6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

platforms/shared/desktop/gui.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ void gui_shortcut(gui_ShortCutEvent event)
189189
gui_shortcut_open_rom = true;
190190
break;
191191
case gui_ShortcutReloadROM:
192-
if (config_debug.debug)
193-
gui_action_reload_rom();
192+
gui_action_reload_rom();
194193
break;
195194
case gui_ShortcutReset:
196195
gui_action_reset();

platforms/shared/desktop/gui_menus.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ static void menu_gearsystem(void)
141141
{
142142
if (config_emulator.recent_roms[i].length() > 0)
143143
{
144-
if (ImGui::MenuItem(config_emulator.recent_roms[i].c_str()))
144+
const char* shortcut = (i == 0) ? config_hotkeys[config_HotkeyIndex_ReloadROM].str : NULL;
145+
if (ImGui::MenuItem(config_emulator.recent_roms[i].c_str(), shortcut))
145146
{
146147
char rom_path[4096];
147148
strcpy(rom_path, config_emulator.recent_roms[i].c_str());
@@ -630,6 +631,7 @@ static void menu_emulator(void)
630631
hotkey_configuration_item("Open ROM:", &config_hotkeys[config_HotkeyIndex_OpenROM]);
631632
hotkey_configuration_item("Quit:", &config_hotkeys[config_HotkeyIndex_Quit]);
632633
hotkey_configuration_item("Reset:", &config_hotkeys[config_HotkeyIndex_Reset]);
634+
hotkey_configuration_item("Reload ROM:", &config_hotkeys[config_HotkeyIndex_ReloadROM]);
633635
hotkey_configuration_item("Pause:", &config_hotkeys[config_HotkeyIndex_Pause]);
634636
hotkey_configuration_item("Fast Forward:", &config_hotkeys[config_HotkeyIndex_FFWD]);
635637
hotkey_configuration_item("Rewind:", &config_hotkeys[config_HotkeyIndex_Rewind]);
@@ -653,7 +655,6 @@ static void menu_emulator(void)
653655

654656
if (ImGui::BeginMenu("Debug Hotkeys"))
655657
{
656-
hotkey_configuration_item("Reload ROM:", &config_hotkeys[config_HotkeyIndex_ReloadROM]);
657658
hotkey_configuration_item("Step Into:", &config_hotkeys[config_HotkeyIndex_DebugStepInto]);
658659
hotkey_configuration_item("Step Over:", &config_hotkeys[config_HotkeyIndex_DebugStepOver]);
659660
hotkey_configuration_item("Step Out:", &config_hotkeys[config_HotkeyIndex_DebugStepOut]);

0 commit comments

Comments
 (0)