mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
path_set_redirect - simplifications
This commit is contained in:
parent
b0b1b0b782
commit
435c80a844
12
paths.c
12
paths.c
@ -62,7 +62,6 @@ void path_set_redirect(void)
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *new_savefile_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *new_savestate_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
bool check_library_name = false;
|
||||
global_t *global = global_get_ptr();
|
||||
const char *old_savefile_dir = dir_get(RARCH_DIR_SAVEFILE);
|
||||
const char *old_savestate_dir = dir_get(RARCH_DIR_SAVESTATE);
|
||||
@ -82,10 +81,6 @@ void path_set_redirect(void)
|
||||
if (!string_is_equal(system->library_name,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE)))
|
||||
#endif
|
||||
check_library_name = true;
|
||||
}
|
||||
|
||||
if (check_library_name)
|
||||
{
|
||||
/* per-core saves: append the library_name to the save location */
|
||||
if (settings->bools.sort_savefiles_enable
|
||||
@ -142,6 +137,7 @@ void path_set_redirect(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Set savefile directory if empty to content directory */
|
||||
if (string_is_empty(new_savefile_dir) || settings->bools.savefiles_in_content_dir)
|
||||
@ -356,10 +352,8 @@ static bool path_init_subsystem(void)
|
||||
path_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname(path, savename,
|
||||
ext, path_size);
|
||||
}
|
||||
fill_pathname(path, savename, ext, path_size);
|
||||
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_REDIRECTING_SAVEFILE_TO),
|
||||
path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user