Skip to content

Commit 723e714

Browse files
committed
Make ROM reload shortcut available everywhere
1 parent b26adda commit 723e714

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
@@ -219,8 +219,7 @@ void gui_shortcut(gui_ShortCutEvent event)
219219
gui_shortcut_open_rom = true;
220220
break;
221221
case gui_ShortcutReloadROM:
222-
if (config_debug.debug)
223-
gui_action_reload_rom();
222+
gui_action_reload_rom();
224223
break;
225224
case gui_ShortcutReset:
226225
gui_action_reset();

platforms/shared/desktop/gui_menus.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ static void menu_geargrafx(void)
168168
{
169169
if (config_emulator.recent_roms[i].length() > 0)
170170
{
171-
if (ImGui::MenuItem(config_emulator.recent_roms[i].c_str()))
171+
const char* shortcut = (i == 0) ? config_hotkeys[config_HotkeyIndex_ReloadROM].str : NULL;
172+
if (ImGui::MenuItem(config_emulator.recent_roms[i].c_str(), shortcut))
172173
{
173174
char rom_path[4096];
174175
strcpy(rom_path, config_emulator.recent_roms[i].c_str());
@@ -640,6 +641,7 @@ static void menu_emulator(void)
640641
hotkey_configuration_item("Open ROM:", &config_hotkeys[config_HotkeyIndex_OpenROM]);
641642
hotkey_configuration_item("Quit:", &config_hotkeys[config_HotkeyIndex_Quit]);
642643
hotkey_configuration_item("Reset:", &config_hotkeys[config_HotkeyIndex_Reset]);
644+
hotkey_configuration_item("Reload ROM:", &config_hotkeys[config_HotkeyIndex_ReloadROM]);
643645
hotkey_configuration_item("Pause:", &config_hotkeys[config_HotkeyIndex_Pause]);
644646
hotkey_configuration_item("Fast Forward:", &config_hotkeys[config_HotkeyIndex_FFWD]);
645647
hotkey_configuration_item("Rewind:", &config_hotkeys[config_HotkeyIndex_Rewind]);
@@ -663,7 +665,6 @@ static void menu_emulator(void)
663665

664666
if (ImGui::BeginMenu("Debug Hotkeys"))
665667
{
666-
hotkey_configuration_item("Reload ROM:", &config_hotkeys[config_HotkeyIndex_ReloadROM]);
667668
hotkey_configuration_item("Step Into:", &config_hotkeys[config_HotkeyIndex_DebugStepInto]);
668669
hotkey_configuration_item("Step Over:", &config_hotkeys[config_HotkeyIndex_DebugStepOver]);
669670
hotkey_configuration_item("Step Out:", &config_hotkeys[config_HotkeyIndex_DebugStepOut]);

0 commit comments

Comments
 (0)