Skip to content

Commit f3c76ee

Browse files
committed
Make ROM reload shortcut available everywhere
1 parent 6fa36f3 commit f3c76ee

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
@@ -172,8 +172,7 @@ void gui_shortcut(gui_ShortCutEvent event)
172172
gui_shortcut_open_rom = true;
173173
break;
174174
case gui_ShortcutReloadROM:
175-
if (config_debug.debug)
176-
gui_action_reload_rom();
175+
gui_action_reload_rom();
177176
break;
178177
case gui_ShortcutReset:
179178
gui_action_reset();

platforms/shared/desktop/gui_menus.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ static void menu_gearboy(void)
177177
{
178178
if (config_emulator.recent_roms[i].length() > 0)
179179
{
180-
if (ImGui::MenuItem(config_emulator.recent_roms[i].c_str()))
180+
const char* shortcut = (i == 0) ? config_hotkeys[config_HotkeyIndex_ReloadROM].str : NULL;
181+
if (ImGui::MenuItem(config_emulator.recent_roms[i].c_str(), shortcut))
181182
{
182183
char rom_path[4096];
183184
strcpy(rom_path, config_emulator.recent_roms[i].c_str());
@@ -611,6 +612,7 @@ static void menu_emulator(void)
611612
hotkey_configuration_item("Open ROM:", &config_hotkeys[config_HotkeyIndex_OpenROM]);
612613
hotkey_configuration_item("Quit:", &config_hotkeys[config_HotkeyIndex_Quit]);
613614
hotkey_configuration_item("Reset:", &config_hotkeys[config_HotkeyIndex_Reset]);
615+
hotkey_configuration_item("Reload ROM:", &config_hotkeys[config_HotkeyIndex_ReloadROM]);
614616
hotkey_configuration_item("Pause:", &config_hotkeys[config_HotkeyIndex_Pause]);
615617
hotkey_configuration_item("Fast Forward:", &config_hotkeys[config_HotkeyIndex_FFWD]);
616618
hotkey_configuration_item("Rewind:", &config_hotkeys[config_HotkeyIndex_Rewind]);
@@ -634,7 +636,6 @@ static void menu_emulator(void)
634636

635637
if (ImGui::BeginMenu("Debug Hotkeys"))
636638
{
637-
hotkey_configuration_item("Reload ROM:", &config_hotkeys[config_HotkeyIndex_ReloadROM]);
638639
hotkey_configuration_item("Step Into:", &config_hotkeys[config_HotkeyIndex_DebugStepInto]);
639640
hotkey_configuration_item("Step Over:", &config_hotkeys[config_HotkeyIndex_DebugStepOver]);
640641
hotkey_configuration_item("Step Out:", &config_hotkeys[config_HotkeyIndex_DebugStepOut]);

0 commit comments

Comments
 (0)