diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index d8370a39fa..d86218d46d 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -394,14 +394,14 @@ void load_menu_game_prepare(void) MENU_TEXTURE_FULLSCREEN); } -void load_menu_game_history(void) +void load_menu_game_history(unsigned game_index) { const char *path = NULL; const char *core_path = NULL; const char *core_name = NULL; rom_history_get_index(rgui->history, - rgui->selection_ptr, &path, &core_path, &core_name); + game_index, &path, &core_path, &core_name); strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro)); strlcpy(g_extern.fullpath, path, sizeof(g_extern.fullpath)); diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index bc6823c2c1..3391e1ab31 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -270,7 +270,7 @@ void shader_manager_get_str(struct gfx_shader *shader, void load_menu_game_prepare(void); bool load_menu_game(void); -void load_menu_game_history(void); +void load_menu_game_history(unsigned game_index); #ifdef __cplusplus } diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 498e01cf0a..d058297ef2 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -2191,7 +2191,7 @@ int rgui_iterate(rgui_handle_t *rgui) } else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY) { - load_menu_game_history(); + load_menu_game_history(rgui->selection_ptr); rgui->need_refresh = true; ret = -1; }