mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
try to fix per-core savedirs for content that needs_fullpath
This commit is contained in:
parent
79cb3abd32
commit
15815caf36
@ -482,6 +482,7 @@ static void event_init_controllers(void)
|
||||
static void event_deinit_core(bool reinit)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
pretro_unload_game();
|
||||
pretro_deinit();
|
||||
@ -489,7 +490,13 @@ static void event_deinit_core(bool reinit)
|
||||
if (reinit)
|
||||
event_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
|
||||
/* auto overrides: reload the original config */
|
||||
/* per-core saves: restore the original path so the config is not affected */
|
||||
if(settings->sort_savefiles_enable)
|
||||
strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir));
|
||||
if(settings->sort_savestates_enable)
|
||||
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
|
||||
|
||||
/* auto overrides: reload the original config */
|
||||
if(global->overrides_active)
|
||||
{
|
||||
config_unload_override();
|
||||
@ -691,12 +698,6 @@ static bool event_init_core(void)
|
||||
retro_init_libretro_cbs(&driver->retro_ctx);
|
||||
rarch_init_system_av_info();
|
||||
|
||||
/* per-core saves: restore the original path so the config is not affected */
|
||||
if(settings->sort_savefiles_enable)
|
||||
strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir));
|
||||
if(settings->sort_savestates_enable)
|
||||
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -275,8 +275,8 @@ void set_paths_redirect(const char *path)
|
||||
strlcpy(orig_savefile_dir,global->savefile_dir,sizeof(global->savefile_dir));
|
||||
fill_pathname_dir(global->savefile_dir,global->savefile_dir,global->system.info.library_name,sizeof(global->savefile_dir));
|
||||
|
||||
// if path doesn't exist try to create it, if everything fails revert to the original path
|
||||
if(!path_is_directory(global->savefile_dir))
|
||||
// if path doesn't exist try to create it, if everything fails revert to the original path
|
||||
if(!path_is_directory(global->savefile_dir))
|
||||
if(!path_mkdir(global->savefile_dir))
|
||||
strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir));
|
||||
}
|
||||
@ -287,8 +287,8 @@ void set_paths_redirect(const char *path)
|
||||
strlcpy(orig_savestate_dir,global->savestate_dir,sizeof(global->savestate_dir));
|
||||
fill_pathname_dir(global->savestate_dir,global->savestate_dir,global->system.info.library_name,sizeof(global->savestate_dir));
|
||||
|
||||
// if path doesn't exist try to create it, if everything fails revert to the original path
|
||||
if(!path_is_directory(global->savestate_dir))
|
||||
// if path doesn't exist try to create it, if everything fails revert to the original path
|
||||
if(!path_is_directory(global->savestate_dir))
|
||||
if(!path_mkdir(global->savestate_dir))
|
||||
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user