summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/settings.h43
-rw-r--r--src/yuzu/configuration/configuration_shared.h9
2 files changed, 27 insertions, 25 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index 1c26081c9..2879237cc 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -701,32 +701,33 @@ struct Values {
701 ResolutionScalingInfo resolution_info{}; 701 ResolutionScalingInfo resolution_info{};
702 SwitchableSetting<ResolutionSetup> resolution_setup{linkage, ResolutionSetup::Res1X, 702 SwitchableSetting<ResolutionSetup> resolution_setup{linkage, ResolutionSetup::Res1X,
703 "resolution_setup", Category::Renderer}; 703 "resolution_setup", Category::Renderer};
704 SwitchableSetting<ScalingFilter> scaling_filter{linkage, ScalingFilter::Bilinear, 704 SwitchableSetting<ScalingFilter, false, true, true> scaling_filter{
705 "scaling_filter", Category::Renderer}; 705 linkage, ScalingFilter::Bilinear, "scaling_filter", Category::Renderer};
706 SwitchableSetting<int, true> fsr_sharpening_slider{ 706 SwitchableSetting<int, true, true, true> fsr_sharpening_slider{
707 linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer}; 707 linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer};
708 SwitchableSetting<AntiAliasing> anti_aliasing{linkage, AntiAliasing::None, "anti_aliasing", 708 SwitchableSetting<AntiAliasing, false, true, true> anti_aliasing{
709 Category::Renderer}; 709 linkage, AntiAliasing::None, "anti_aliasing", Category::Renderer};
710 // *nix platforms may have issues with the borderless windowed fullscreen mode. 710 // *nix platforms may have issues with the borderless windowed fullscreen mode.
711 // Default to exclusive fullscreen on these platforms for now. 711 // Default to exclusive fullscreen on these platforms for now.
712 SwitchableSetting<FullscreenMode, true> fullscreen_mode{linkage, 712 SwitchableSetting<FullscreenMode, true, true, true> fullscreen_mode{linkage,
713#ifdef _WIN32 713#ifdef _WIN32
714 FullscreenMode::Borderless, 714 FullscreenMode::Borderless,
715#else 715#else
716 FullscreenMode::Exclusive, 716 FullscreenMode::Exclusive,
717#endif 717#endif
718 FullscreenMode::Borderless, 718 FullscreenMode::Borderless,
719 FullscreenMode::Exclusive, 719 FullscreenMode::Exclusive,
720 "fullscreen_mode", 720 "fullscreen_mode",
721 Category::Renderer}; 721 Category::Renderer};
722 SwitchableSetting<int, true> aspect_ratio{linkage, 0, 0, 4, "aspect_ratio", Category::Renderer}; 722 SwitchableSetting<int, true, true, true> aspect_ratio{
723 linkage, 0, 0, 4, "aspect_ratio", Category::Renderer};
723 SwitchableSetting<AnisotropyMode, true> max_anisotropy{ 724 SwitchableSetting<AnisotropyMode, true> max_anisotropy{
724 linkage, AnisotropyMode::Automatic, AnisotropyMode::Automatic, AnisotropyMode::X16, 725 linkage, AnisotropyMode::Automatic, AnisotropyMode::Automatic, AnisotropyMode::X16,
725 "max_anisotropy", Category::RendererAdvanced}; 726 "max_anisotropy", Category::RendererAdvanced};
726 SwitchableSetting<bool, false, false> use_speed_limit{linkage, true, "use_speed_limit", 727 SwitchableSetting<bool, false, false, true> use_speed_limit{linkage, true, "use_speed_limit",
727 Category::Renderer}; 728 Category::Renderer};
728 SwitchableSetting<u16, true> speed_limit{linkage, 100, 0, 729 SwitchableSetting<u16, true, true, true> speed_limit{
729 9999, "speed_limit", Category::Renderer}; 730 linkage, 100, 0, 9999, "speed_limit", Category::Renderer};
730 SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache", 731 SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache",
731 Category::Renderer}; 732 Category::Renderer};
732 SwitchableSetting<GPUAccuracy, true, true, true> gpu_accuracy{ 733 SwitchableSetting<GPUAccuracy, true, true, true> gpu_accuracy{
@@ -742,7 +743,7 @@ struct Values {
742 AstcDecodeMode::CPUAsynchronous, 743 AstcDecodeMode::CPUAsynchronous,
743 "accelerate_astc", 744 "accelerate_astc",
744 Category::Renderer}; 745 Category::Renderer};
745 Setting<VSyncMode, true> vsync_mode{ 746 Setting<VSyncMode, true, true, true> vsync_mode{
746 linkage, VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::FIFORelaxed, 747 linkage, VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::FIFORelaxed,
747 "use_vsync", Category::Renderer}; 748 "use_vsync", Category::Renderer};
748 SwitchableSetting<bool> use_reactive_flushing{linkage, true, "use_reactive_flushing", 749 SwitchableSetting<bool> use_reactive_flushing{linkage, true, "use_reactive_flushing",
@@ -769,9 +770,9 @@ struct Values {
769 SwitchableSetting<bool> barrier_feedback_loops{linkage, true, "barrier_feedback_loops", 770 SwitchableSetting<bool> barrier_feedback_loops{linkage, true, "barrier_feedback_loops",
770 Category::RendererAdvanced}; 771 Category::RendererAdvanced};
771 772
772 SwitchableSetting<u8> bg_red{linkage, 0, "bg_red", Category::Renderer}; 773 SwitchableSetting<u8, false, true, true> bg_red{linkage, 0, "bg_red", Category::Renderer};
773 SwitchableSetting<u8> bg_green{linkage, 0, "bg_green", Category::Renderer}; 774 SwitchableSetting<u8, false, true, true> bg_green{linkage, 0, "bg_green", Category::Renderer};
774 SwitchableSetting<u8> bg_blue{linkage, 0, "bg_blue", Category::Renderer}; 775 SwitchableSetting<u8, false, true, true> bg_blue{linkage, 0, "bg_blue", Category::Renderer};
775 776
776 // System 777 // System
777 SwitchableSetting<bool> rng_seed_enabled{linkage, false, "rng_seed_enabled", Category::System}; 778 SwitchableSetting<bool> rng_seed_enabled{linkage, false, "rng_seed_enabled", Category::System};
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h
index d0fe6ea38..d70828935 100644
--- a/src/yuzu/configuration/configuration_shared.h
+++ b/src/yuzu/configuration/configuration_shared.h
@@ -92,10 +92,11 @@ void SetPerGameSetting(QComboBox* combobox,
92void SetHighlight(QWidget* widget, bool highlighted); 92void SetHighlight(QWidget* widget, bool highlighted);
93 93
94// Sets up a QCheckBox like a tristate one, given a Setting 94// Sets up a QCheckBox like a tristate one, given a Setting
95template <bool ranged, bool save> 95template <bool ranged, bool save, bool runtime_modifiable>
96void SetColoredTristate(QCheckBox* checkbox, 96void SetColoredTristate(
97 const Settings::SwitchableSetting<bool, ranged, save>& setting, 97 QCheckBox* checkbox,
98 CheckState& tracker) { 98 const Settings::SwitchableSetting<bool, ranged, save, runtime_modifiable>& setting,
99 CheckState& tracker) {
99 if (setting.UsingGlobal()) { 100 if (setting.UsingGlobal()) {
100 tracker = CheckState::Global; 101 tracker = CheckState::Global;
101 } else { 102 } else {