diff options
| author | 2020-07-14 13:36:09 -0400 | |
|---|---|---|
| committer | 2020-07-14 13:36:09 -0400 | |
| commit | 6d1477f214199d8a59b8ab0eea161e16463e35bb (patch) | |
| tree | 874ff82a255f281dcf2d6b0a69e1f4e81248b74e /src/core | |
| parent | main: Set async gpu properly after loading per-game setting (diff) | |
| download | yuzu-6d1477f214199d8a59b8ab0eea161e16463e35bb.tar.gz yuzu-6d1477f214199d8a59b8ab0eea161e16463e35bb.tar.xz yuzu-6d1477f214199d8a59b8ab0eea161e16463e35bb.zip | |
settings: Move settings sanitization to its own function
Creates a new function that can be expanded later to fix other settings that are known to cause emulation errors across executables.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/settings.cpp | 6 | ||||
| -rw-r--r-- | src/core/settings.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index d3886c4ec..38f0789a0 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp | |||
| @@ -184,4 +184,10 @@ void RestoreGlobalState() { | |||
| 184 | values.sound_index.SetGlobal(true); | 184 | values.sound_index.SetGlobal(true); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | void Sanitize() { | ||
| 188 | values.use_asynchronous_gpu_emulation.SetValue( | ||
| 189 | values.use_asynchronous_gpu_emulation.GetValue() || | ||
| 190 | values.use_multi_core.GetValue()); | ||
| 191 | } | ||
| 192 | |||
| 187 | } // namespace Settings | 193 | } // namespace Settings |
diff --git a/src/core/settings.h b/src/core/settings.h index 850ca4072..878840116 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -539,4 +539,7 @@ void LogSettings(); | |||
| 539 | // Restore the global state of all applicable settings in the Values struct | 539 | // Restore the global state of all applicable settings in the Values struct |
| 540 | void RestoreGlobalState(); | 540 | void RestoreGlobalState(); |
| 541 | 541 | ||
| 542 | // Fixes settings that are known to cause issues with the emulator | ||
| 543 | void Sanitize(); | ||
| 544 | |||
| 542 | } // namespace Settings | 545 | } // namespace Settings |