diff --git a/settings.c b/settings.c index 8150cc1fad..c82b9f09fe 100644 --- a/settings.c +++ b/settings.c @@ -515,6 +515,8 @@ void config_set_defaults(void) if (*g_defaults.config_path) fill_pathname_expand_special(g_extern.config_path, g_defaults.config_path, sizeof(g_extern.config_path)); + + fill_pathname_resolve_relative(g_settings.game_history_path, g_extern.config_path, ".retroarch-game-history.txt", sizeof(g_settings.game_history_path)); g_extern.config_save_on_exit = config_save_on_exit; @@ -1087,8 +1089,8 @@ bool config_load_file(const char *path, bool set_defaults) CONFIG_GET_INT(network_cmd_port, "network_cmd_port"); CONFIG_GET_BOOL(stdin_cmd_enable, "stdin_cmd_enable"); - fill_pathname_resolve_relative(g_settings.game_history_path, g_extern.config_path, ".retroarch-game-history.txt", sizeof(g_settings.game_history_path)); - CONFIG_GET_PATH(game_history_path, "game_history_path"); + if (config_get_path(conf, "game_history_path", tmp_str, sizeof(tmp_str))) + strlcpy(g_settings.game_history_path, tmp_str, sizeof(g_settings.game_history_path)); CONFIG_GET_INT(game_history_size, "game_history_size"); CONFIG_GET_INT(input.turbo_period, "input_turbo_period");