mirror of
https://github.com/libretro/RetroArch
synced 2025-02-26 06:40:39 +00:00
Drop ROM history if config_path isn't set.
Avoid loading and saving history from/to a potential broken path.
This commit is contained in:
parent
6cee86c768
commit
e15ba44c50
@ -499,11 +499,14 @@ void menu_init(void)
|
||||
|
||||
// TODO: Should make history path configurable.
|
||||
// Possibly size as well.
|
||||
char history_path[PATH_MAX];
|
||||
fill_pathname_resolve_relative(history_path, g_extern.config_path,
|
||||
".retroarch-history.txt", sizeof(history_path));
|
||||
RARCH_LOG("[RGUI]: Opening history: %s.\n", history_path);
|
||||
rgui->history = rom_history_init(history_path, 20);
|
||||
if (*g_extern.config_path)
|
||||
{
|
||||
char history_path[PATH_MAX];
|
||||
fill_pathname_resolve_relative(history_path, g_extern.config_path,
|
||||
".retroarch-history.txt", sizeof(history_path));
|
||||
RARCH_LOG("[RGUI]: Opening history: %s.\n", history_path);
|
||||
rgui->history = rom_history_init(history_path, 20);
|
||||
}
|
||||
}
|
||||
|
||||
void menu_free(void)
|
||||
|
@ -1109,7 +1109,8 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
|
||||
rgui_list_push(rgui->selection_buf, "Core", RGUI_SETTINGS_CORE, 0);
|
||||
#endif
|
||||
rgui_list_push(rgui->selection_buf, "Core Options", RGUI_SETTINGS_CORE_OPTIONS, 0);
|
||||
rgui_list_push(rgui->selection_buf, "Load Game (History)", RGUI_SETTINGS_OPEN_HISTORY, 0);
|
||||
if (rgui->history)
|
||||
rgui_list_push(rgui->selection_buf, "Load Game (History)", RGUI_SETTINGS_OPEN_HISTORY, 0);
|
||||
rgui_list_push(rgui->selection_buf, "Load Game", RGUI_SETTINGS_OPEN_FILEBROWSER, 0);
|
||||
rgui_list_push(rgui->selection_buf, "Video Options", RGUI_SETTINGS_VIDEO_OPTIONS, 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user