mirror of
https://github.com/libretro/RetroArch
synced 2025-04-23 11:43:20 +00:00
this code is not always reached, so let's instead initialize the variable before checking if sorting is enabled
This commit is contained in:
parent
942bf6cb93
commit
30c4436aa9
16
retroarch.c
16
retroarch.c
@ -329,6 +329,14 @@ void set_paths_redirect(const char *path)
|
|||||||
(info->info.library_name[0] != '\0'))
|
(info->info.library_name[0] != '\0'))
|
||||||
? msg_hash_calculate(info->info.library_name) : 0);
|
? msg_hash_calculate(info->info.library_name) : 0);
|
||||||
|
|
||||||
|
/* Initialize current save directories with the values from the config */
|
||||||
|
strlcpy(current_savefile_dir,
|
||||||
|
global->dir.savefile,
|
||||||
|
sizeof(current_savefile_dir));
|
||||||
|
strlcpy(current_savestate_dir,
|
||||||
|
global->dir.savestate,
|
||||||
|
sizeof(current_savestate_dir));
|
||||||
|
|
||||||
if(global_library_name_hash != 0 &&
|
if(global_library_name_hash != 0 &&
|
||||||
(global_library_name_hash != MENU_VALUE_NO_CORE))
|
(global_library_name_hash != MENU_VALUE_NO_CORE))
|
||||||
{
|
{
|
||||||
@ -355,10 +363,6 @@ void set_paths_redirect(const char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
strlcpy(current_savefile_dir,
|
|
||||||
global->dir.savefile,
|
|
||||||
sizeof(current_savefile_dir));
|
|
||||||
|
|
||||||
/* per-core states: append the library_name to the save location */
|
/* per-core states: append the library_name to the save location */
|
||||||
if (settings->sort_savestates_enable && global->dir.savestate[0] != '\0')
|
if (settings->sort_savestates_enable && global->dir.savestate[0] != '\0')
|
||||||
@ -383,10 +387,6 @@ void set_paths_redirect(const char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
strlcpy(current_savestate_dir,
|
|
||||||
global->dir.savestate,
|
|
||||||
sizeof(current_savestate_dir));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(path_is_directory(current_savefile_dir))
|
if(path_is_directory(current_savefile_dir))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user