(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
This commit is contained in:
twinaphex 2013-11-03 05:49:46 +01:00
parent 2e5d151fac
commit c55a0885c7

View File

@ -207,9 +207,10 @@ void menu_rom_history_push_current(void)
if (*tmp) if (*tmp)
path_resolve_realpath(tmp, sizeof(tmp)); path_resolve_realpath(tmp, sizeof(tmp));
menu_rom_history_push(*tmp ? tmp : NULL, if (g_extern.system.no_game || *tmp)
g_settings.libretro, menu_rom_history_push(*tmp ? tmp : NULL,
g_extern.system.info.library_name); g_settings.libretro,
g_extern.system.info.library_name);
} }
void load_menu_game_prepare(void) 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); msg_queue_push(g_extern.msg_queue, str, 1, 1);
} }
menu_rom_history_push(*g_extern.fullpath ? g_extern.fullpath : NULL, if (g_extern.system.no_game || *g_extern.fullpath)
g_settings.libretro, menu_rom_history_push(*g_extern.fullpath ? g_extern.fullpath : NULL,
rgui->info.library_name ? rgui->info.library_name : ""); g_settings.libretro,
rgui->info.library_name ? rgui->info.library_name : "");
} }
#ifdef HAVE_RGUI #ifdef HAVE_RGUI