mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
Merge pull request #4337 from lat9nq/fix-per-game-async
main: Set async gpu properly after loading per-game setting
This commit is contained in:
commit
2781201bfb
3 changed files with 10 additions and 0 deletions
|
@ -184,4 +184,9 @@ void RestoreGlobalState() {
|
||||||
values.sound_index.SetGlobal(true);
|
values.sound_index.SetGlobal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sanitize() {
|
||||||
|
values.use_asynchronous_gpu_emulation.SetValue(
|
||||||
|
values.use_asynchronous_gpu_emulation.GetValue() || values.use_multi_core.GetValue());
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Settings
|
} // namespace Settings
|
||||||
|
|
|
@ -526,4 +526,7 @@ void LogSettings();
|
||||||
// Restore the global state of all applicable settings in the Values struct
|
// Restore the global state of all applicable settings in the Values struct
|
||||||
void RestoreGlobalState();
|
void RestoreGlobalState();
|
||||||
|
|
||||||
|
// Fixes settings that are known to cause issues with the emulator
|
||||||
|
void Sanitize();
|
||||||
|
|
||||||
} // namespace Settings
|
} // namespace Settings
|
||||||
|
|
|
@ -1368,11 +1368,13 @@ void Config::WriteSettingGlobal(const QString& name, const QVariant& value, bool
|
||||||
|
|
||||||
void Config::Reload() {
|
void Config::Reload() {
|
||||||
ReadValues();
|
ReadValues();
|
||||||
|
Settings::Sanitize();
|
||||||
// To apply default value changes
|
// To apply default value changes
|
||||||
SaveValues();
|
SaveValues();
|
||||||
Settings::Apply();
|
Settings::Apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Config::Save() {
|
void Config::Save() {
|
||||||
|
Settings::Sanitize();
|
||||||
SaveValues();
|
SaveValues();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue