summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/settings.cpp6
-rw-r--r--src/core/settings.h3
-rw-r--r--src/yuzu/configuration/config.cpp2
-rw-r--r--src/yuzu/main.cpp4
4 files changed, 11 insertions, 4 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
187void 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
540void RestoreGlobalState(); 540void RestoreGlobalState();
541 541
542// Fixes settings that are known to cause issues with the emulator
543void Sanitize();
544
542} // namespace Settings 545} // namespace Settings
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 1b2b1b2bb..e586792bb 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -1342,11 +1342,13 @@ void Config::WriteSettingGlobal(const QString& name, const QVariant& value, bool
1342 1342
1343void Config::Reload() { 1343void Config::Reload() {
1344 ReadValues(); 1344 ReadValues();
1345 Settings::Sanitize();
1345 // To apply default value changes 1346 // To apply default value changes
1346 SaveValues(); 1347 SaveValues();
1347 Settings::Apply(); 1348 Settings::Apply();
1348} 1349}
1349 1350
1350void Config::Save() { 1351void Config::Save() {
1352 Settings::Sanitize();
1351 SaveValues(); 1353 SaveValues();
1352} 1354}
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 8f889be3a..432379705 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1053,10 +1053,6 @@ void GMainWindow::BootGame(const QString& filename) {
1053 if (!(loader == nullptr || loader->ReadProgramId(title_id) != Loader::ResultStatus::Success)) { 1053 if (!(loader == nullptr || loader->ReadProgramId(title_id) != Loader::ResultStatus::Success)) {
1054 // Load per game settings 1054 // Load per game settings
1055 Config per_game_config(fmt::format("{:016X}.ini", title_id), false); 1055 Config per_game_config(fmt::format("{:016X}.ini", title_id), false);
1056
1057 Settings::values.use_asynchronous_gpu_emulation.SetValue(
1058 Settings::values.use_asynchronous_gpu_emulation.GetValue() ||
1059 Settings::values.use_multi_core.GetValue());
1060 } 1056 }
1061 1057
1062 Settings::LogSettings(); 1058 Settings::LogSettings();