diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-07-23 16:18:07 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-07-23 16:18:07 +0200 |
commit | d8b00fd863c8aa9fca02a479ce958899f1aadf24 (patch) | |
tree | 670b7f4947b9fd917f9675f8e302cd97f897b7bc /src | |
parent | general: Implement FullscreenMode enumeration (diff) | |
download | yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.tar yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.tar.gz yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.tar.bz2 yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.tar.lz yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.tar.xz yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.tar.zst yuzu-d8b00fd863c8aa9fca02a479ce958899f1aadf24.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/configuration/configure_cpu.cpp | 17 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_graphics_advanced.cpp | 20 |
2 files changed, 2 insertions, 35 deletions
diff --git a/src/yuzu/configuration/configure_cpu.cpp b/src/yuzu/configuration/configure_cpu.cpp index 8d7171487..784b6484e 100644 --- a/src/yuzu/configuration/configure_cpu.cpp +++ b/src/yuzu/configuration/configure_cpu.cpp @@ -65,6 +65,7 @@ void ConfigureCpu::UpdateGroup(int index) { } void ConfigureCpu::ApplyConfiguration() { + ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpu_accuracy, ui->accuracy); ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_unfuse_fma, ui->cpuopt_unsafe_unfuse_fma, cpuopt_unsafe_unfuse_fma); @@ -80,22 +81,6 @@ void ConfigureCpu::ApplyConfiguration() { ConfigurationShared::ApplyPerGameSetting(&Settings::values.cpuopt_unsafe_fastmem_check, ui->cpuopt_unsafe_fastmem_check, cpuopt_unsafe_fastmem_check); - - if (Settings::IsConfiguringGlobal()) { - // Guard if during game and set to game-specific value - if (Settings::values.cpu_accuracy.UsingGlobal()) { - Settings::values.cpu_accuracy.SetValue( - static_cast<Settings::CPUAccuracy>(ui->accuracy->currentIndex())); - } - } else { - if (ui->accuracy->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) { - Settings::values.cpu_accuracy.SetGlobal(true); - } else { - Settings::values.cpu_accuracy.SetGlobal(false); - Settings::values.cpu_accuracy.SetValue(static_cast<Settings::CPUAccuracy>( - ui->accuracy->currentIndex() - ConfigurationShared::USE_GLOBAL_OFFSET)); - } - } } void ConfigureCpu::changeEvent(QEvent* event) { diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index a9e611125..e952777ab 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp @@ -50,11 +50,7 @@ void ConfigureGraphicsAdvanced::SetConfiguration() { } void ConfigureGraphicsAdvanced::ApplyConfiguration() { - // Subtract 2 if configuring per-game (separator and "use global configuration" take 2 slots) - const auto gpu_accuracy = static_cast<Settings::GPUAccuracy>( - ui->gpu_accuracy->currentIndex() - - ((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET)); - + ConfigurationShared::ApplyPerGameSetting(&Settings::values.gpu_accuracy, ui->gpu_accuracy); ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy, ui->anisotropic_filtering_combobox); ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync, use_vsync); @@ -67,20 +63,6 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() { use_caches_gc); ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time, ui->use_fast_gpu_time, use_fast_gpu_time); - - if (Settings::IsConfiguringGlobal()) { - // Must guard in case of a during-game configuration when set to be game-specific. - if (Settings::values.gpu_accuracy.UsingGlobal()) { - Settings::values.gpu_accuracy.SetValue(gpu_accuracy); - } - } else { - if (ui->gpu_accuracy->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) { - Settings::values.gpu_accuracy.SetGlobal(true); - } else { - Settings::values.gpu_accuracy.SetGlobal(false); - Settings::values.gpu_accuracy.SetValue(gpu_accuracy); - } - } } void ConfigureGraphicsAdvanced::changeEvent(QEvent* event) { |