Only save per-core configs when core specific option is enabled.
Also, need to enforce that g_settings.core_specific_config is true after loading core specific config. It's possible that core specific option is set to false before loading a different core (using global config only).
This commit is contained in:
parent
13a006d147
commit
be81549d92
|
@ -290,7 +290,7 @@ void main_exit(args_type() args)
|
||||||
config_save_file(g_extern.config_path);
|
config_save_file(g_extern.config_path);
|
||||||
|
|
||||||
// Flush out the core specific config.
|
// Flush out the core specific config.
|
||||||
if (*g_extern.core_specific_config_path)
|
if (*g_extern.core_specific_config_path && g_settings.core_specific_config)
|
||||||
config_save_file(g_extern.core_specific_config_path);
|
config_save_file(g_extern.core_specific_config_path);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -467,15 +467,19 @@ static void config_load_core_specific(void)
|
||||||
if (!config_load_file(g_extern.core_specific_config_path, true))
|
if (!config_load_file(g_extern.core_specific_config_path, true))
|
||||||
RARCH_WARN("Core-specific config not found, reusing last config.\n");
|
RARCH_WARN("Core-specific config not found, reusing last config.\n");
|
||||||
|
|
||||||
// don't have the core config file overwrite the libretro path
|
// Force some parameters which are implied when using core specific configs.
|
||||||
|
|
||||||
|
// Don't have the core config file overwrite the libretro path.
|
||||||
strlcpy(g_settings.libretro, tmp, sizeof(g_settings.libretro));
|
strlcpy(g_settings.libretro, tmp, sizeof(g_settings.libretro));
|
||||||
|
// This must be true for core specific configs.
|
||||||
|
g_settings.core_specific_config = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void config_load(void)
|
void config_load(void)
|
||||||
{
|
{
|
||||||
// Flush out per-core configs before loading a new config.
|
// Flush out per-core configs before loading a new config.
|
||||||
if (*g_extern.core_specific_config_path && g_extern.config_save_on_exit)
|
if (*g_extern.core_specific_config_path && g_extern.config_save_on_exit && g_settings.core_specific_config)
|
||||||
config_save_file(g_extern.core_specific_config_path);
|
config_save_file(g_extern.core_specific_config_path);
|
||||||
|
|
||||||
if (!g_extern.block_config_read)
|
if (!g_extern.block_config_read)
|
||||||
|
|
Loading…
Reference in New Issue