diff --git a/retroarch.c b/retroarch.c index bed60f4043..f75ecdf5e1 100644 --- a/retroarch.c +++ b/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))