Skip to content

Commit

Permalink
Move directories to dirs.c
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Oct 1, 2016
1 parent 346c1d3 commit eb90fe9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
16 changes: 15 additions & 1 deletion dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions dirs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 4 additions & 12 deletions paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eb90fe9

Please sign in to comment.