diff --git a/command_event.c b/command_event.c index 9872d7f053..762a2b3725 100644 --- a/command_event.c +++ b/command_event.c @@ -605,7 +605,7 @@ static bool event_init_core(void) /* per-core saves: reset redirection paths */ if((settings->sort_savestates_enable || settings->sort_savefiles_enable) && !global->inited.core.no_content) - set_paths_redirect(global->name.base); + rarch_ctl(RARCH_CTL_SET_PATHS_REDIRECT, NULL); rarch_ctl(RARCH_CTL_VERIFY_API_VERSION, NULL); core.retro_init(); diff --git a/retroarch.c b/retroarch.c index ff258daa36..d56fc88b75 100644 --- a/retroarch.c +++ b/retroarch.c @@ -350,7 +350,7 @@ const char *rarch_get_current_savefile_dir(void) return NULL; } -void set_paths_redirect(const char *path) +static void set_paths_redirect(const char *path) { bool check_global_library_name_hash = false; global_t *global = global_get_ptr(); @@ -1345,6 +1345,9 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) switch(state) { + case RARCH_CTL_SET_PATHS_REDIRECT: + set_paths_redirect(global->name.base); + break; case RARCH_CTL_SET_ERROR_ON_INIT: rarch_error_on_init = true; break; diff --git a/retroarch.h b/retroarch.h index 30b895ef8f..ab17295160 100644 --- a/retroarch.h +++ b/retroarch.h @@ -92,6 +92,8 @@ enum rarch_ctl_state RARCH_CTL_FILL_PATHNAMES, + RARCH_CTL_SET_PATHS_REDIRECT, + RARCH_CTL_SET_FORCE_FULLSCREEN, RARCH_CTL_UNSET_FORCE_FULLSCREEN, @@ -217,8 +219,6 @@ void rarch_init_system_av_info(void); void rarch_set_paths(const char *path); -void set_paths_redirect(const char *path); - int rarch_info_get_capabilities(enum rarch_capabilities type, char *s, size_t len); enum rarch_content_type rarch_path_is_media_type(const char *path);