mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 18:50:29 +00:00
Do not overwrite system dir path unless it's empty.
This should fix the issue on consoles where system_directory is mysteriously overwritten.
This commit is contained in:
parent
eaf5041cd8
commit
734fdc4bf6
13
retroarch.c
13
retroarch.c
@ -706,15 +706,10 @@ static void set_paths(const char *path)
|
||||
RARCH_LOG("Redirecting save state to \"%s\".\n", g_extern.savestate_name);
|
||||
}
|
||||
|
||||
#if !defined(RARCH_CONSOLE)
|
||||
/* we DON'T want the system directory overwritten for the consoles */
|
||||
/* FIXME - this is a really nasty piece of code that can cost many hours of
|
||||
fruitless debugging chores without realizing it's due to this. Try to make
|
||||
this entirely optional at runtime through some kind of variable you have to
|
||||
enable to do this logic - as it is it is really not acceptable and can lead
|
||||
to many unintended problems on consoles */
|
||||
fill_pathname_basedir(g_settings.system_directory, path, sizeof(g_settings.system_directory));
|
||||
#endif
|
||||
// If this is already set,
|
||||
// do not overwrite it as this was initialized before in a menu or otherwise.
|
||||
if (!*g_settings.system_directory)
|
||||
fill_pathname_basedir(g_settings.system_directory, path, sizeof(g_settings.system_directory));
|
||||
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
if (*g_extern.config_path && path_is_directory(g_extern.config_path))
|
||||
|
Loading…
Reference in New Issue
Block a user