diff --git a/configuration.c b/configuration.c index b44fd2a36b..846864b6b2 100644 --- a/configuration.c +++ b/configuration.c @@ -2234,7 +2234,7 @@ bool config_load_override(void) RARCH_LOG("[overrides] core-specific overrides found at %s.\n", core_path); config_file_free(new_conf); - path_set_config_append(core_path); + path_set(RARCH_PATH_CONFIG_APPEND, core_path); should_append = true; } @@ -2262,7 +2262,7 @@ bool config_load_override(void) else strlcpy(temp_path, game_path, sizeof(temp_path)); - path_set_config_append(temp_path); + path_set(RARCH_PATH_CONFIG_APPEND, temp_path); should_append = true; } @@ -2533,7 +2533,7 @@ bool config_load_shader_preset(void) /* Game shader preset exists, load it. */ RARCH_LOG("Shaders: game-specific shader preset found at %s.\n", game_path); - path_set_default_shader_preset(settings->path.shader); + path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->path.shader); strlcpy(settings->path.shader, game_path, sizeof(settings->path.shader)); config_file_free(new_conf); return true; @@ -2563,7 +2563,7 @@ bool config_load_shader_preset(void) /* Core shader preset exists, load it. */ RARCH_LOG("Shaders: core-specific shader preset found at %s.\n", core_path); - path_set_default_shader_preset(settings->path.shader); + path_set(RARCH_PATH_DEFAULT_SHADER_PRESET, settings->path.shader); strlcpy(settings->path.shader, core_path, sizeof(settings->path.shader)); config_file_free(new_conf); return true; diff --git a/paths.c b/paths.c index a5a32f0522..b9a54a70ec 100644 --- a/paths.c +++ b/paths.c @@ -507,6 +507,14 @@ bool path_set(enum rarch_path_type type, const char *path) strlcpy(path_libretro, path, sizeof(path_libretro)); break; + case RARCH_PATH_DEFAULT_SHADER_PRESET: + strlcpy(path_default_shader_preset, path, + sizeof(path_default_shader_preset)); + break; + case RARCH_PATH_CONFIG_APPEND: + strlcpy(path_config_append_file, path, + sizeof(path_config_append_file)); + break; case RARCH_PATH_CONFIG: strlcpy(path_config_file, path, sizeof(path_config_file)); @@ -606,14 +614,6 @@ void path_clear_core_options(void) *path_core_options_file = '\0'; } -bool path_set_default_shader_preset(const char *preset) -{ - if (!preset) - return false; - strlcpy(path_default_shader_preset, preset, - sizeof(path_default_shader_preset)); - return true; -} const char *path_get_core_options(void) @@ -645,11 +645,6 @@ void path_clear_content(void) } -void path_set_config_append(const char *path) -{ - strlcpy(path_config_append_file, path, sizeof(path_config_append_file)); -} - bool path_get_content(char **fullpath) { if (!fullpath) diff --git a/paths.h b/paths.h index de11ea859f..fd8f505138 100644 --- a/paths.h +++ b/paths.h @@ -37,7 +37,9 @@ enum rarch_path_type RARCH_PATH_CORE, RARCH_PATH_CONFIG, RARCH_PATH_CONTENT, + RARCH_PATH_CONFIG_APPEND, RARCH_PATH_CORE_OPTIONS, + RARCH_PATH_DEFAULT_SHADER_PRESET, RARCH_PATH_SUBSYSTEM }; diff --git a/retroarch.c b/retroarch.c index cc2fb6bf66..bdd57ba790 100644 --- a/retroarch.c +++ b/retroarch.c @@ -760,7 +760,7 @@ static void retroarch_parse_input(int argc, char *argv[]) #endif case RA_OPT_APPENDCONFIG: - path_set_config_append(optarg); + path_set(RARCH_PATH_CONFIG_APPEND, optarg); break; case RA_OPT_SIZE: