diff --git a/dirs.c b/dirs.c index 32afeb46dc..2a80b64da0 100644 --- a/dirs.c +++ b/dirs.c @@ -45,7 +45,8 @@ static struct rarch_dir_list dir_shader_list; static char dir_osk_overlay[PATH_MAX_LENGTH] = {0}; static char dir_system[PATH_MAX_LENGTH] = {0}; static char dir_savefile[PATH_MAX_LENGTH] = {0}; -char current_savefile_dir[PATH_MAX_LENGTH] = {0}; +static char current_savefile_dir[PATH_MAX_LENGTH] = {0}; +static char current_savestate_dir[PATH_MAX_LENGTH] = {0}; static char dir_savestate[PATH_MAX_LENGTH] = {0}; static bool shader_dir_init(struct rarch_dir_list *dir_list) @@ -278,6 +279,11 @@ const char *dir_get_current_savefile(void) return current_savefile_dir; } +const char *dir_get_current_savestate(void) +{ + return current_savestate_dir; +} + const char *dir_get_osk_overlay(void) { return dir_osk_overlay; @@ -300,6 +306,14 @@ const char *dir_get_savestate(void) /* set functions */ +void dir_set_current_savefile(const char *path) +{ +} + +void dir_set_current_savestate(const char *path) +{ +} + void dir_set_osk_overlay(const char *path) { strlcpy(dir_osk_overlay, path, diff --git a/dirs.h b/dirs.h index 7e67e97d19..bf7a445f81 100644 --- a/dirs.h +++ b/dirs.h @@ -89,8 +89,14 @@ const char *dir_get_system(void); const char *dir_get_current_savefile(void); +const char *dir_get_current_savestate(void); + /* set functions */ +void dir_set_current_savefile(const char *path); + +void dir_set_current_savestate(const char *path); + void dir_set_osk_overlay(const char *path); void dir_set_savefile(const char *path); diff --git a/paths.c b/paths.c index 82f00ee8f8..706dea05c9 100644 --- a/paths.c +++ b/paths.c @@ -48,21 +48,15 @@ #define MENU_VALUE_NO_CORE 0x7d5472cbU -extern char current_savefile_dir[PATH_MAX_LENGTH]; - static struct string_list *subsystem_fullpaths = NULL; -char subsystem_path[PATH_MAX_LENGTH] = {0}; - +static char subsystem_path[PATH_MAX_LENGTH] = {0}; static char path_default_shader_preset[PATH_MAX_LENGTH] = {0}; -static char path_main_basename[PATH_MAX_LENGTH] = {0} -; +static char path_main_basename[PATH_MAX_LENGTH] = {0}; static char path_content[PATH_MAX_LENGTH] = {0}; -static char current_savestate_dir[PATH_MAX_LENGTH] = {0}; static char path_libretro[PATH_MAX_LENGTH] = {0}; static char path_config_file[PATH_MAX_LENGTH] = {0}; static char path_config_append_file[PATH_MAX_LENGTH] = {0}; -/* Config file associated with per-core configs. */ static char path_core_options_file[PATH_MAX_LENGTH] = {0}; void path_set_redirect(void) @@ -210,10 +204,8 @@ void path_set_redirect(void) } } - strlcpy(current_savefile_dir, new_savefile_dir, - sizeof(current_savefile_dir)); - strlcpy(current_savestate_dir, new_savestate_dir, - sizeof(current_savestate_dir)); + dir_set_current_savefile(new_savefile_dir); + dir_set_current_savestate(new_savestate_dir); } void path_set_basename(const char *path)