From 163f229d2641426a163356c877ecd5b8b7555558 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 9 Jun 2023 17:24:29 -0400 Subject: settings: Reorder Groups graphics audio and system settings together in a way that reflects the frontend. This also just conceptually groups them more nicely than they were. --- src/common/settings.h | 153 +++++++++++++++++++++++++------------------------- 1 file changed, 78 insertions(+), 75 deletions(-) (limited to 'src') diff --git a/src/common/settings.h b/src/common/settings.h index 141408d3e..f6e977e96 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -557,8 +557,11 @@ struct Values { Setting sink_id{linkage, AudioEngine::Auto, "output_engine", Category::Audio}; Setting audio_output_device_id{linkage, "auto", "output_device", Category::Audio}; Setting audio_input_device_id{linkage, "auto", "input_device", Category::Audio}; - Setting audio_muted{linkage, false, "audio_muted", Category::Audio, false}; + SwitchableSetting sound_index{linkage, AudioMode::Stereo, + AudioMode::Mono, AudioMode::Surround, + "sound_index", Category::SystemAudio}; SwitchableSetting volume{linkage, 100, 0, 200, "volume", Category::Audio, true, true}; + Setting audio_muted{linkage, false, "audio_muted", Category::Audio, false}; Setting dump_audio_commands{linkage, false, "dump_audio_commands", Category::Audio, false}; @@ -612,28 +615,35 @@ struct Values { SwitchableSetting renderer_backend{ linkage, RendererBackend::Vulkan, RendererBackend::OpenGL, RendererBackend::Null, "backend", Category::Renderer}; - SwitchableSetting async_presentation{linkage, false, "async_presentation", - Category::RendererAdvanced}; - SwitchableSetting renderer_force_max_clock{linkage, false, "force_max_clock", - Category::RendererAdvanced}; - Setting renderer_debug{linkage, false, "debug", Category::RendererDebug}; - Setting renderer_shader_feedback{linkage, false, "shader_feedback", - Category::RendererDebug}; - Setting enable_nsight_aftermath{linkage, false, "nsight_aftermath", - Category::RendererDebug}; - Setting disable_shader_loop_safety_checks{ - linkage, false, "disable_shader_loop_safety_checks", Category::RendererDebug}; + SwitchableSetting shader_backend{ + linkage, ShaderBackend::Glsl, ShaderBackend::Glsl, ShaderBackend::SpirV, + "shader_backend", Category::Renderer}; SwitchableSetting vulkan_device{linkage, 0, "vulkan_device", Category::Renderer}; - ResolutionScalingInfo resolution_info{}; - SwitchableSetting resolution_setup{linkage, ResolutionSetup::Res1X, - "resolution_setup", Category::Renderer}; - SwitchableSetting scaling_filter{ - linkage, ScalingFilter::Bilinear, "scaling_filter", Category::Renderer, true, true}; - SwitchableSetting fsr_sharpening_slider{ - linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer, true, true}; - SwitchableSetting anti_aliasing{ - linkage, AntiAliasing::None, "anti_aliasing", Category::Renderer, true, true}; + SwitchableSetting use_disk_shader_cache{linkage, true, "use_disk_shader_cache", + Category::Renderer}; + SwitchableSetting use_asynchronous_gpu_emulation{ + linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer}; + SwitchableSetting use_speed_limit{ + linkage, true, "use_speed_limit", Category::Renderer, false, true}; + SwitchableSetting speed_limit{ + linkage, 100, 0, 9999, "speed_limit", Category::Renderer, true, true}; + SwitchableSetting accelerate_astc{linkage, + AstcDecodeMode::Cpu, + AstcDecodeMode::Cpu, + AstcDecodeMode::CpuAsynchronous, + "accelerate_astc", + Category::Renderer}; + Setting vsync_mode{linkage, + VSyncMode::Fifo, + VSyncMode::Immediate, + VSyncMode::FifoRelaxed, + "use_vsync", + Category::Renderer, + true, + true}; + SwitchableSetting nvdec_emulation{linkage, NvdecEmulation::Gpu, + "nvdec_emulation", Category::Renderer}; // *nix platforms may have issues with the borderless windowed fullscreen mode. // Default to exclusive fullscreen on these platforms for now. SwitchableSetting fullscreen_mode{linkage, @@ -656,15 +666,21 @@ struct Values { Category::Renderer, true, true}; - SwitchableSetting max_anisotropy{ - linkage, AnisotropyMode::Automatic, AnisotropyMode::Automatic, AnisotropyMode::X16, - "max_anisotropy", Category::RendererAdvanced}; - SwitchableSetting use_speed_limit{ - linkage, true, "use_speed_limit", Category::Renderer, false, true}; - SwitchableSetting speed_limit{ - linkage, 100, 0, 9999, "speed_limit", Category::Renderer, true, true}; - SwitchableSetting use_disk_shader_cache{linkage, true, "use_disk_shader_cache", - Category::Renderer}; + + ResolutionScalingInfo resolution_info{}; + SwitchableSetting resolution_setup{linkage, ResolutionSetup::Res1X, + "resolution_setup", Category::Renderer}; + SwitchableSetting scaling_filter{ + linkage, ScalingFilter::Bilinear, "scaling_filter", Category::Renderer, true, true}; + SwitchableSetting anti_aliasing{ + linkage, AntiAliasing::None, "anti_aliasing", Category::Renderer, true, true}; + SwitchableSetting fsr_sharpening_slider{ + linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer, true, true}; + + SwitchableSetting bg_red{linkage, 0, "bg_red", Category::Renderer, true, true}; + SwitchableSetting bg_green{linkage, 0, "bg_green", Category::Renderer, true, true}; + SwitchableSetting bg_blue{linkage, 0, "bg_blue", Category::Renderer, true, true}; + SwitchableSetting gpu_accuracy{linkage, GpuAccuracy::High, GpuAccuracy::Normal, @@ -673,29 +689,21 @@ struct Values { Category::RendererAdvanced, true, true}; - SwitchableSetting use_asynchronous_gpu_emulation{ - linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer}; - SwitchableSetting nvdec_emulation{linkage, NvdecEmulation::Gpu, - "nvdec_emulation", Category::Renderer}; - SwitchableSetting accelerate_astc{linkage, - AstcDecodeMode::Cpu, - AstcDecodeMode::Cpu, - AstcDecodeMode::CpuAsynchronous, - "accelerate_astc", - Category::Renderer}; - Setting vsync_mode{linkage, - VSyncMode::Fifo, - VSyncMode::Immediate, - VSyncMode::FifoRelaxed, - "use_vsync", - Category::Renderer, - true, - true}; + SwitchableSetting max_anisotropy{ + linkage, AnisotropyMode::Automatic, AnisotropyMode::Automatic, AnisotropyMode::X16, + "max_anisotropy", Category::RendererAdvanced}; + SwitchableSetting astc_recompression{linkage, + AstcRecompression::Uncompressed, + AstcRecompression::Uncompressed, + AstcRecompression::Bc3, + "astc_recompression", + Category::RendererAdvanced}; + SwitchableSetting async_presentation{linkage, false, "async_presentation", + Category::RendererAdvanced}; + SwitchableSetting renderer_force_max_clock{linkage, false, "force_max_clock", + Category::RendererAdvanced}; SwitchableSetting use_reactive_flushing{linkage, true, "use_reactive_flushing", Category::RendererAdvanced}; - SwitchableSetting shader_backend{ - linkage, ShaderBackend::Glsl, ShaderBackend::Glsl, ShaderBackend::SpirV, - "shader_backend", Category::Renderer}; SwitchableSetting use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders", Category::RendererAdvanced}; SwitchableSetting use_fast_gpu_time{ @@ -704,34 +712,20 @@ struct Values { linkage, true, "use_vulkan_driver_pipeline_cache", Category::RendererAdvanced, true, true}; SwitchableSetting enable_compute_pipelines{linkage, false, "enable_compute_pipelines", Category::RendererAdvanced}; - SwitchableSetting astc_recompression{linkage, - AstcRecompression::Uncompressed, - AstcRecompression::Uncompressed, - AstcRecompression::Bc3, - "astc_recompression", - Category::RendererAdvanced}; SwitchableSetting use_video_framerate{linkage, false, "use_video_framerate", Category::RendererAdvanced}; SwitchableSetting barrier_feedback_loops{linkage, true, "barrier_feedback_loops", Category::RendererAdvanced}; - SwitchableSetting bg_red{linkage, 0, "bg_red", Category::Renderer, true, true}; - SwitchableSetting bg_green{linkage, 0, "bg_green", Category::Renderer, true, true}; - SwitchableSetting bg_blue{linkage, 0, "bg_blue", Category::Renderer, true, true}; + Setting renderer_debug{linkage, false, "debug", Category::RendererDebug}; + Setting renderer_shader_feedback{linkage, false, "shader_feedback", + Category::RendererDebug}; + Setting enable_nsight_aftermath{linkage, false, "nsight_aftermath", + Category::RendererDebug}; + Setting disable_shader_loop_safety_checks{ + linkage, false, "disable_shader_loop_safety_checks", Category::RendererDebug}; // System - SwitchableSetting rng_seed_enabled{linkage, false, "rng_seed_enabled", - Category::System, true, true}; - SwitchableSetting rng_seed{linkage, 0, "rng_seed", Category::System, true, true}; - Setting device_name{linkage, "Yuzu", "device_name", Category::System, true, true}; - // Measured in seconds since epoch - SwitchableSetting custom_rtc_enabled{linkage, false, "custom_rtc_enabled", - Category::System, true, true}; - SwitchableSetting custom_rtc{linkage, 0, "custom_rtc", Category::System, true, true}; - // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc` - s64 custom_rtc_differential; - - Setting current_user{linkage, 0, "current_user", Category::System}; SwitchableSetting language_index{linkage, Language::EnglishAmerican, Language::Japanese, @@ -743,9 +737,18 @@ struct Values { SwitchableSetting time_zone_index{linkage, TimeZone::Auto, TimeZone::Auto, TimeZone::Zulu, "time_zone_index", Category::System}; - SwitchableSetting sound_index{linkage, AudioMode::Stereo, - AudioMode::Mono, AudioMode::Surround, - "sound_index", Category::SystemAudio}; + // Measured in seconds since epoch + SwitchableSetting custom_rtc_enabled{linkage, false, "custom_rtc_enabled", + Category::System, true, true}; + SwitchableSetting custom_rtc{linkage, 0, "custom_rtc", Category::System, true, true}; + // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc` + s64 custom_rtc_differential; + SwitchableSetting rng_seed_enabled{linkage, false, "rng_seed_enabled", + Category::System, true, true}; + SwitchableSetting rng_seed{linkage, 0, "rng_seed", Category::System, true, true}; + Setting device_name{linkage, "Yuzu", "device_name", Category::System, true, true}; + + Setting current_user{linkage, 0, "current_user", Category::System}; SwitchableSetting use_docked_mode{linkage, true, "use_docked_mode", Category::System}; -- cgit v1.2.3