mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-22 12:05:38 +01: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
@ -894,9 +894,10 @@ void Config::WriteSettingGeneric(const Settings::BasicSetting* const setting) {
|
|||||||
WriteBooleanSetting(std::string(key).append("\\use_global"), setting->UsingGlobal());
|
WriteBooleanSetting(std::string(key).append("\\use_global"), setting->UsingGlobal());
|
||||||
}
|
}
|
||||||
if (global || !setting->UsingGlobal()) {
|
if (global || !setting->UsingGlobal()) {
|
||||||
|
auto value = global ? setting->ToStringGlobal() : setting->ToString();
|
||||||
WriteBooleanSetting(std::string(key).append("\\default"),
|
WriteBooleanSetting(std::string(key).append("\\default"),
|
||||||
setting->ToString() == setting->DefaultToString());
|
value == setting->DefaultToString());
|
||||||
WriteStringSetting(key, setting->ToString());
|
WriteStringSetting(key, value);
|
||||||
}
|
}
|
||||||
} else if (global) {
|
} else if (global) {
|
||||||
WriteBooleanSetting(std::string(key).append("\\default"),
|
WriteBooleanSetting(std::string(key).append("\\default"),
|
||||||
|
Loading…
Reference in New Issue
Block a user