mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 04:59:59 +00:00
frontend_common: config: Only write setting related to opened config file
If we tried to write a switchable setting to config that was not using global in the global config instance, we could write the per-game setting accidentally. This ensures that we always use the global setting for global config and the currently applied setting for custom config.
This commit is contained in:
parent
1c278974a8
commit
fa04dea7c4
1 changed files with 3 additions and 2 deletions
|
@ -894,9 +894,10 @@ void Config::WriteSettingGeneric(const Settings::BasicSetting* const setting) {
|
|||
WriteBooleanSetting(std::string(key).append("\\use_global"), setting->UsingGlobal());
|
||||
}
|
||||
if (global || !setting->UsingGlobal()) {
|
||||
auto value = global ? setting->ToStringGlobal() : setting->ToString();
|
||||
WriteBooleanSetting(std::string(key).append("\\default"),
|
||||
setting->ToString() == setting->DefaultToString());
|
||||
WriteStringSetting(key, setting->ToString());
|
||||
value == setting->DefaultToString());
|
||||
WriteStringSetting(key, value);
|
||||
}
|
||||
} else if (global) {
|
||||
WriteBooleanSetting(std::string(key).append("\\default"),
|
||||
|
|
Loading…
Reference in a new issue