summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-07-16 17:33:51 +0200
committerGitHub <noreply@github.com>2020-07-16 17:33:51 +0200
commit2781201bfb507fb47a103843755ee0dc8e2e6d23 (patch)
tree1974fd3d321308ff351db84bc74d17e98bb5d805 /src
parentMerge pull request #4297 from FearlessTobi/skip-profile-select (diff)
parentclang-format (diff)
downloadyuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.tar
yuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.tar.gz
yuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.tar.bz2
yuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.tar.lz
yuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.tar.xz
yuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.tar.zst
yuzu-2781201bfb507fb47a103843755ee0dc8e2e6d23.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/settings.cpp5
-rw-r--r--src/core/settings.h3
-rw-r--r--src/yuzu/configuration/config.cpp2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index d3886c4ec..64a3c69d3 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -184,4 +184,9 @@ void RestoreGlobalState() {
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
diff --git a/src/core/settings.h b/src/core/settings.h
index 3eb336f75..a64debd25 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -526,4 +526,7 @@ void LogSettings();
// Restore the global state of all applicable settings in the Values struct
void RestoreGlobalState();
+// Fixes settings that are known to cause issues with the emulator
+void Sanitize();
+
} // namespace Settings
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 9e9b38214..d25b99a32 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -1368,11 +1368,13 @@ void Config::WriteSettingGlobal(const QString& name, const QVariant& value, bool
void Config::Reload() {
ReadValues();
+ Settings::Sanitize();
// To apply default value changes
SaveValues();
Settings::Apply();
}
void Config::Save() {
+ Settings::Sanitize();
SaveValues();
}