From c55a0885c7c3027d63a1ed9ca927c83972933d8b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 3 Nov 2013 05:49:46 +0100 Subject: [PATCH] (RARCH_CONSOLE) Fixes pushes to ROM history list - it should only push an entry if either g_extern.system.no_game is true, or when either *tmp or g_extern.fullpath is not null. Otherwise it will push an entry with a bogus 'ROM path' to the list, and this broke RMenu badly --- frontend/menu/menu_common.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index c5b45969c7..f3f47f4db2 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -207,9 +207,10 @@ void menu_rom_history_push_current(void) if (*tmp) path_resolve_realpath(tmp, sizeof(tmp)); - menu_rom_history_push(*tmp ? tmp : NULL, - g_settings.libretro, - g_extern.system.info.library_name); + if (g_extern.system.no_game || *tmp) + menu_rom_history_push(*tmp ? tmp : NULL, + g_settings.libretro, + g_extern.system.info.library_name); } void load_menu_game_prepare(void) @@ -226,9 +227,10 @@ void load_menu_game_prepare(void) msg_queue_push(g_extern.msg_queue, str, 1, 1); } - menu_rom_history_push(*g_extern.fullpath ? g_extern.fullpath : NULL, - g_settings.libretro, - rgui->info.library_name ? rgui->info.library_name : ""); + if (g_extern.system.no_game || *g_extern.fullpath) + menu_rom_history_push(*g_extern.fullpath ? g_extern.fullpath : NULL, + g_settings.libretro, + rgui->info.library_name ? rgui->info.library_name : ""); } #ifdef HAVE_RGUI