diff options
-rw-r--r-- | src/common/settings.h | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/config.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/common/settings.h b/src/common/settings.h index f9988c266..9f7e1096b 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -286,6 +286,8 @@ struct Values { // Cpu Setting<CPUAccuracy> cpu_accuracy{CPUAccuracy::Auto, "cpu_accuracy"}; + // TODO: remove cpu_accuracy_first_time, migration setting added 8 July 2021 + BasicSetting<bool> cpu_accuracy_first_time{true, "cpu_accuracy_first_time"}; BasicSetting<bool> cpuopt_page_tables{true, "cpuopt_page_tables"}; BasicSetting<bool> cpuopt_block_linking{true, "cpuopt_block_linking"}; diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 1a0f75373..1e77c1e51 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -793,7 +793,13 @@ void Config::ReadPathValues() { void Config::ReadCpuValues() { qt_config->beginGroup(QStringLiteral("Cpu")); - ReadGlobalSetting(Settings::values.cpu_accuracy); + ReadBasicSetting(Settings::values.cpu_accuracy_first_time); + if (Settings::values.cpu_accuracy_first_time) { + Settings::values.cpu_accuracy.SetValue(Settings::values.cpu_accuracy.GetDefault()); + Settings::values.cpu_accuracy_first_time.SetValue(false); + } else { + ReadGlobalSetting(Settings::values.cpu_accuracy); + } ReadGlobalSetting(Settings::values.cpuopt_unsafe_unfuse_fma); ReadGlobalSetting(Settings::values.cpuopt_unsafe_reduce_fp_error); @@ -1309,6 +1315,7 @@ void Config::SavePathValues() { void Config::SaveCpuValues() { qt_config->beginGroup(QStringLiteral("Cpu")); + WriteBasicSetting(Settings::values.cpu_accuracy_first_time); WriteSetting(QStringLiteral("cpu_accuracy"), static_cast<u32>(Settings::values.cpu_accuracy.GetValue(global)), static_cast<u32>(Settings::values.cpu_accuracy.GetDefault()), |