mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-27 13:31:21 -08:00
settings, yuzu qt: Add migration code for CPU accuracy
Old CPU Accuracy setting won't translate well into since we're adding one at the beginning of the list. On first boot with the new setting, just use the default setting.
This commit is contained in:
parent
87b6e14d7c
commit
c8b8674ffc
@ -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"};
|
||||
|
@ -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()),
|
||||
|
Loading…
Reference in New Issue
Block a user