diff options
author | Matías Locatti <matias.locatti@gmail.com> | 2022-11-20 01:04:04 +0100 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-11-24 10:22:13 +0100 |
commit | f209e976f4887f399250c558ac725bc5723eec38 (patch) | |
tree | 78d1ed79f0bfadaa968a8f0e0fb21465441428b5 /src/yuzu/configuration/configure_graphics.cpp | |
parent | Merge pull request #9299 from lioncash/cast (diff) | |
download | yuzu-f209e976f4887f399250c558ac725bc5723eec38.tar yuzu-f209e976f4887f399250c558ac725bc5723eec38.tar.gz yuzu-f209e976f4887f399250c558ac725bc5723eec38.tar.bz2 yuzu-f209e976f4887f399250c558ac725bc5723eec38.tar.lz yuzu-f209e976f4887f399250c558ac725bc5723eec38.tar.xz yuzu-f209e976f4887f399250c558ac725bc5723eec38.tar.zst yuzu-f209e976f4887f399250c558ac725bc5723eec38.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index bd69d04a6..3a40872ab 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -63,6 +63,9 @@ ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* paren ui->api_widget->isEnabled()); ui->bg_label->setVisible(Settings::IsConfiguringGlobal()); ui->bg_combobox->setVisible(!Settings::IsConfiguringGlobal()); + + connect(ui->fsr_sharpening_slider, &QSlider::valueChanged, this, + &ConfigureGraphics::SetFSRIndicatorText); } void ConfigureGraphics::UpdateDeviceSelection(int device) { @@ -110,6 +113,7 @@ void ConfigureGraphics::SetConfiguration() { static_cast<int>(Settings::values.resolution_setup.GetValue())); ui->scaling_filter_combobox->setCurrentIndex( static_cast<int>(Settings::values.scaling_filter.GetValue())); + ui->fsr_sharpening_slider->setValue(Settings::values.fsr_sharpening_slider.GetValue()); ui->anti_aliasing_combobox->setCurrentIndex( static_cast<int>(Settings::values.anti_aliasing.GetValue())); } else { @@ -155,6 +159,12 @@ void ConfigureGraphics::SetConfiguration() { Settings::values.bg_green.GetValue(), Settings::values.bg_blue.GetValue())); UpdateAPILayout(); + SetFSRIndicatorText(ui->fsr_sharpening_slider->sliderPosition()); +} + +void ConfigureGraphics::SetFSRIndicatorText(int percentage) { + ui->fsr_sharpening_value->setText( + tr("%1%", "FSR sharpening percentage (e.g. 50%)").arg(100 - (percentage / 2))); } void ConfigureGraphics::ApplyConfiguration() { @@ -210,6 +220,7 @@ void ConfigureGraphics::ApplyConfiguration() { if (Settings::values.anti_aliasing.UsingGlobal()) { Settings::values.anti_aliasing.SetValue(anti_aliasing); } + Settings::values.fsr_sharpening_slider.SetValue(ui->fsr_sharpening_slider->value()); } else { if (ui->resolution_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) { Settings::values.resolution_setup.SetGlobal(true); @@ -380,6 +391,7 @@ void ConfigureGraphics::SetupPerGameUI() { ui->aspect_ratio_combobox->setEnabled(Settings::values.aspect_ratio.UsingGlobal()); ui->resolution_combobox->setEnabled(Settings::values.resolution_setup.UsingGlobal()); ui->scaling_filter_combobox->setEnabled(Settings::values.scaling_filter.UsingGlobal()); + ui->fsr_sharpening_slider->setEnabled(Settings::values.fsr_sharpening_slider.UsingGlobal()); ui->anti_aliasing_combobox->setEnabled(Settings::values.anti_aliasing.UsingGlobal()); ui->use_asynchronous_gpu_emulation->setEnabled( Settings::values.use_asynchronous_gpu_emulation.UsingGlobal()); |