@@ -52,7 +52,6 @@ static bool loading_rom_active = false;
5252static char loading_rom_path[4096 ] = " " ;
5353static bool loading_physical_cdrom = false ;
5454static void main_window (void );
55- static void push_recent_rom (std::string path);
5655static void show_status_message (void );
5756static void show_error_window (void );
5857static void show_loading_popup (void );
@@ -445,7 +444,7 @@ void gui_load_rom(const char* path)
445444 loading_physical_cdrom = false ;
446445
447446 gui_debug_auto_save_settings ();
448- push_recent_rom (path);
447+ config_push_recent_media (path);
449448 emu_resume ();
450449
451450 strncpy (loading_rom_path, path, sizeof (loading_rom_path) - 1 );
@@ -638,27 +637,6 @@ static void main_window(void)
638637 ImGui::PopStyleVar ();
639638}
640639
641- static void push_recent_rom (std::string path)
642- {
643- int slot = 0 ;
644- for (slot = 0 ; slot < config_max_recent_roms; slot++)
645- {
646- if (config_emulator.recent_roms [slot].compare (path) == 0 )
647- {
648- break ;
649- }
650- }
651-
652- slot = MIN (slot, config_max_recent_roms - 1 );
653-
654- for (int i = slot; i > 0 ; i--)
655- {
656- config_emulator.recent_roms [i] = config_emulator.recent_roms [i - 1 ];
657- }
658-
659- config_emulator.recent_roms [0 ] = path;
660- }
661-
662640static void show_status_message (void )
663641{
664642 if (status_message_active)
0 commit comments