summaryrefslogtreecommitdiff
path: root/src/common/settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/settings.h')
-rw-r--r--src/common/settings.h136
1 files changed, 86 insertions, 50 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index 0ae71dd1b..c78dd85c8 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -128,25 +128,31 @@ struct Values {
128 Linkage linkage{}; 128 Linkage linkage{};
129 129
130 // Audio 130 // Audio
131 Setting<AudioEngine> sink_id{linkage, AudioEngine::Auto, "output_engine", Category::Audio}; 131 Setting<AudioEngine> sink_id{linkage, AudioEngine::Auto, "output_engine", Category::Audio,
132 Setting<std::string> audio_output_device_id{linkage, "auto", "output_device", Category::Audio}; 132 Specialization::RuntimeList};
133 Setting<std::string> audio_input_device_id{linkage, "auto", "input_device", Category::Audio}; 133 Setting<std::string> audio_output_device_id{linkage, "auto", "output_device", Category::Audio,
134 Specialization::RuntimeList};
135 Setting<std::string> audio_input_device_id{linkage, "auto", "input_device", Category::Audio,
136 Specialization::RuntimeList};
134 SwitchableSetting<AudioMode, true> sound_index{linkage, AudioMode::Stereo, 137 SwitchableSetting<AudioMode, true> sound_index{linkage, AudioMode::Stereo,
135 AudioMode::Mono, AudioMode::Surround, 138 AudioMode::Mono, AudioMode::Surround,
136 "sound_index", Category::SystemAudio}; 139 "sound_index", Category::SystemAudio};
137 SwitchableSetting<u8, true> volume{linkage, 100, 0, 200, "volume", Category::Audio, true, true}; 140 SwitchableSetting<u8, true> volume{
138 Setting<bool, false> audio_muted{linkage, false, "audio_muted", Category::Audio, false}; 141 linkage, 100, 0, 200, "volume", Category::Audio, Specialization::Scalar, true, true};
139 Setting<bool, false> dump_audio_commands{linkage, false, "dump_audio_commands", Category::Audio, 142 Setting<bool, false> audio_muted{
140 false}; 143 linkage, false, "audio_muted", Category::Audio, Specialization::Default, false};
144 Setting<bool, false> dump_audio_commands{
145 linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false};
141 146
142 // Core 147 // Core
143 SwitchableSetting<bool> use_multi_core{linkage, true, "use_multi_core", Category::Core}; 148 SwitchableSetting<bool> use_multi_core{linkage, true, "use_multi_core", Category::Core};
144 SwitchableSetting<bool> use_unsafe_extended_memory_layout{ 149 SwitchableSetting<bool> use_unsafe_extended_memory_layout{
145 linkage, false, "use_unsafe_extended_memory_layout", Category::Core}; 150 linkage, false, "use_unsafe_extended_memory_layout", Category::Core};
146 SwitchableSetting<bool> use_speed_limit{linkage, true, "use_speed_limit", 151 SwitchableSetting<bool> use_speed_limit{
147 Category::Core, false, true}; 152 linkage, true, "use_speed_limit", Category::Core, Specialization::Paired, false, true};
148 SwitchableSetting<u16, true> speed_limit{linkage, 100, 0, 9999, "speed_limit", 153 SwitchableSetting<u16, true> speed_limit{
149 Category::Core, true, true}; 154 linkage, 100, 0, 9999, "speed_limit", Category::Core, Specialization::Countable,
155 true, true};
150 156
151 // Cpu 157 // Cpu
152 SwitchableSetting<CpuAccuracy, true> cpu_accuracy{linkage, CpuAccuracy::Auto, 158 SwitchableSetting<CpuAccuracy, true> cpu_accuracy{linkage, CpuAccuracy::Auto,
@@ -192,9 +198,10 @@ struct Values {
192 linkage, RendererBackend::Vulkan, RendererBackend::OpenGL, RendererBackend::Null, 198 linkage, RendererBackend::Vulkan, RendererBackend::OpenGL, RendererBackend::Null,
193 "backend", Category::Renderer}; 199 "backend", Category::Renderer};
194 SwitchableSetting<ShaderBackend, true> shader_backend{ 200 SwitchableSetting<ShaderBackend, true> shader_backend{
195 linkage, ShaderBackend::Glsl, ShaderBackend::Glsl, ShaderBackend::SpirV, 201 linkage, ShaderBackend::Glsl, ShaderBackend::Glsl, ShaderBackend::SpirV,
196 "shader_backend", Category::Renderer}; 202 "shader_backend", Category::Renderer, Specialization::RuntimeList};
197 SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer}; 203 SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer,
204 Specialization::RuntimeList};
198 205
199 SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache", 206 SwitchableSetting<bool> use_disk_shader_cache{linkage, true, "use_disk_shader_cache",
200 Category::Renderer}; 207 Category::Renderer};
@@ -206,14 +213,10 @@ struct Values {
206 AstcDecodeMode::CpuAsynchronous, 213 AstcDecodeMode::CpuAsynchronous,
207 "accelerate_astc", 214 "accelerate_astc",
208 Category::Renderer}; 215 Category::Renderer};
209 Setting<VSyncMode, true> vsync_mode{linkage, 216 Setting<VSyncMode, true> vsync_mode{
210 VSyncMode::Fifo, 217 linkage, VSyncMode::Fifo, VSyncMode::Immediate, VSyncMode::FifoRelaxed,
211 VSyncMode::Immediate, 218 "use_vsync", Category::Renderer, Specialization::RuntimeList, true,
212 VSyncMode::FifoRelaxed, 219 true};
213 "use_vsync",
214 Category::Renderer,
215 true,
216 true};
217 SwitchableSetting<NvdecEmulation> nvdec_emulation{linkage, NvdecEmulation::Gpu, 220 SwitchableSetting<NvdecEmulation> nvdec_emulation{linkage, NvdecEmulation::Gpu,
218 "nvdec_emulation", Category::Renderer}; 221 "nvdec_emulation", Category::Renderer};
219 // *nix platforms may have issues with the borderless windowed fullscreen mode. 222 // *nix platforms may have issues with the borderless windowed fullscreen mode.
@@ -228,6 +231,7 @@ struct Values {
228 FullscreenMode::Exclusive, 231 FullscreenMode::Exclusive,
229 "fullscreen_mode", 232 "fullscreen_mode",
230 Category::Renderer, 233 Category::Renderer,
234 Specialization::Default,
231 true, 235 true,
232 true}; 236 true};
233 SwitchableSetting<AspectRatio, true> aspect_ratio{linkage, 237 SwitchableSetting<AspectRatio, true> aspect_ratio{linkage,
@@ -236,22 +240,37 @@ struct Values {
236 AspectRatio::Stretch, 240 AspectRatio::Stretch,
237 "aspect_ratio", 241 "aspect_ratio",
238 Category::Renderer, 242 Category::Renderer,
243 Specialization::Default,
239 true, 244 true,
240 true}; 245 true};
241 246
242 ResolutionScalingInfo resolution_info{}; 247 ResolutionScalingInfo resolution_info{};
243 SwitchableSetting<ResolutionSetup> resolution_setup{linkage, ResolutionSetup::Res1X, 248 SwitchableSetting<ResolutionSetup> resolution_setup{linkage, ResolutionSetup::Res1X,
244 "resolution_setup", Category::Renderer}; 249 "resolution_setup", Category::Renderer};
245 SwitchableSetting<ScalingFilter> scaling_filter{ 250 SwitchableSetting<ScalingFilter> scaling_filter{linkage,
246 linkage, ScalingFilter::Bilinear, "scaling_filter", Category::Renderer, true, true}; 251 ScalingFilter::Bilinear,
247 SwitchableSetting<AntiAliasing> anti_aliasing{ 252 "scaling_filter",
248 linkage, AntiAliasing::None, "anti_aliasing", Category::Renderer, true, true}; 253 Category::Renderer,
254 Specialization::Default,
255 true,
256 true};
257 SwitchableSetting<AntiAliasing> anti_aliasing{linkage,
258 AntiAliasing::None,
259 "anti_aliasing",
260 Category::Renderer,
261 Specialization::Default,
262 true,
263 true};
249 SwitchableSetting<int, true> fsr_sharpening_slider{ 264 SwitchableSetting<int, true> fsr_sharpening_slider{
250 linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer, true, true}; 265 linkage, 25, 0, 200, "fsr_sharpening_slider", Category::Renderer, Specialization::Scalar,
266 true, true};
251 267
252 SwitchableSetting<u8, false> bg_red{linkage, 0, "bg_red", Category::Renderer, true, true}; 268 SwitchableSetting<u8, false> bg_red{
253 SwitchableSetting<u8, false> bg_green{linkage, 0, "bg_green", Category::Renderer, true, true}; 269 linkage, 0, "bg_red", Category::Renderer, Specialization::Default, true, true};
254 SwitchableSetting<u8, false> bg_blue{linkage, 0, "bg_blue", Category::Renderer, true, true}; 270 SwitchableSetting<u8, false> bg_green{
271 linkage, 0, "bg_green", Category::Renderer, Specialization::Default, true, true};
272 SwitchableSetting<u8, false> bg_blue{
273 linkage, 0, "bg_blue", Category::Renderer, Specialization::Default, true, true};
255 274
256 SwitchableSetting<GpuAccuracy, true> gpu_accuracy{linkage, 275 SwitchableSetting<GpuAccuracy, true> gpu_accuracy{linkage,
257 GpuAccuracy::High, 276 GpuAccuracy::High,
@@ -259,6 +278,7 @@ struct Values {
259 GpuAccuracy::Extreme, 278 GpuAccuracy::Extreme,
260 "gpu_accuracy", 279 "gpu_accuracy",
261 Category::RendererAdvanced, 280 Category::RendererAdvanced,
281 Specialization::Default,
262 true, 282 true,
263 true}; 283 true};
264 SwitchableSetting<AnisotropyMode, true> max_anisotropy{ 284 SwitchableSetting<AnisotropyMode, true> max_anisotropy{
@@ -279,9 +299,15 @@ struct Values {
279 SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders", 299 SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
280 Category::RendererAdvanced}; 300 Category::RendererAdvanced};
281 SwitchableSetting<bool> use_fast_gpu_time{ 301 SwitchableSetting<bool> use_fast_gpu_time{
282 linkage, true, "use_fast_gpu_time", Category::RendererAdvanced, true, true}; 302 linkage, true, "use_fast_gpu_time", Category::RendererAdvanced, Specialization::Default,
283 SwitchableSetting<bool> use_vulkan_driver_pipeline_cache{ 303 true, true};
284 linkage, true, "use_vulkan_driver_pipeline_cache", Category::RendererAdvanced, true, true}; 304 SwitchableSetting<bool> use_vulkan_driver_pipeline_cache{linkage,
305 true,
306 "use_vulkan_driver_pipeline_cache",
307 Category::RendererAdvanced,
308 Specialization::Default,
309 true,
310 true};
285 SwitchableSetting<bool> enable_compute_pipelines{linkage, false, "enable_compute_pipelines", 311 SwitchableSetting<bool> enable_compute_pipelines{linkage, false, "enable_compute_pipelines",
286 Category::RendererAdvanced}; 312 Category::RendererAdvanced};
287 SwitchableSetting<bool> use_video_framerate{linkage, false, "use_video_framerate", 313 SwitchableSetting<bool> use_video_framerate{linkage, false, "use_video_framerate",
@@ -310,15 +336,18 @@ struct Values {
310 TimeZone::Auto, TimeZone::Zulu, 336 TimeZone::Auto, TimeZone::Zulu,
311 "time_zone_index", Category::System}; 337 "time_zone_index", Category::System};
312 // Measured in seconds since epoch 338 // Measured in seconds since epoch
313 SwitchableSetting<bool> custom_rtc_enabled{linkage, false, "custom_rtc_enabled", 339 SwitchableSetting<bool> custom_rtc_enabled{
314 Category::System, true, true}; 340 linkage, false, "custom_rtc_enabled", Category::System, Specialization::Paired, true, true};
315 SwitchableSetting<s64> custom_rtc{linkage, 0, "custom_rtc", Category::System, true, true}; 341 SwitchableSetting<s64> custom_rtc{
342 linkage, 0, "custom_rtc", Category::System, Specialization::Time, true, true};
316 // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc` 343 // Set on game boot, reset on stop. Seconds difference between current time and `custom_rtc`
317 s64 custom_rtc_differential; 344 s64 custom_rtc_differential;
318 SwitchableSetting<bool> rng_seed_enabled{linkage, false, "rng_seed_enabled", 345 SwitchableSetting<bool> rng_seed_enabled{
319 Category::System, true, true}; 346 linkage, false, "rng_seed_enabled", Category::System, Specialization::Paired, true, true};
320 SwitchableSetting<u32> rng_seed{linkage, 0, "rng_seed", Category::System, true, true}; 347 SwitchableSetting<u32> rng_seed{linkage, 0, "rng_seed", Category::System, Specialization::Hex,
321 Setting<std::string> device_name{linkage, "yuzu", "device_name", Category::System, true, true}; 348 true, true};
349 Setting<std::string> device_name{
350 linkage, "yuzu", "device_name", Category::System, Specialization::Default, true, true};
322 351
323 Setting<s32> current_user{linkage, 0, "current_user", Category::System}; 352 Setting<s32> current_user{linkage, 0, "current_user", Category::System};
324 353
@@ -327,12 +356,13 @@ struct Values {
327 // Controls 356 // Controls
328 InputSetting<std::array<PlayerInput, 10>> players; 357 InputSetting<std::array<PlayerInput, 10>> players;
329 358
330 Setting<bool> enable_raw_input{linkage, false, "enable_raw_input", Category::Controls, 359 Setting<bool> enable_raw_input{
360 linkage, false, "enable_raw_input", Category::Controls, Specialization::Default,
331// Only read/write enable_raw_input on Windows platforms 361// Only read/write enable_raw_input on Windows platforms
332#ifdef _WIN32 362#ifdef _WIN32
333 true 363 true
334#else 364#else
335 false 365 false
336#endif 366#endif
337 }; 367 };
338 Setting<bool> controller_navigation{linkage, true, "controller_navigation", Category::Controls}; 368 Setting<bool> controller_navigation{linkage, true, "controller_navigation", Category::Controls};
@@ -354,7 +384,8 @@ struct Values {
354 Setting<bool> tas_enable{linkage, false, "tas_enable", Category::Controls}; 384 Setting<bool> tas_enable{linkage, false, "tas_enable", Category::Controls};
355 Setting<bool> tas_loop{linkage, false, "tas_loop", Category::Controls}; 385 Setting<bool> tas_loop{linkage, false, "tas_loop", Category::Controls};
356 386
357 Setting<bool> mouse_panning{linkage, false, "mouse_panning", Category::Controls, false}; 387 Setting<bool> mouse_panning{
388 linkage, false, "mouse_panning", Category::Controls, Specialization::Default, false};
358 Setting<u8, true> mouse_panning_sensitivity{ 389 Setting<u8, true> mouse_panning_sensitivity{
359 linkage, 50, 1, 100, "mouse_panning_sensitivity", Category::Controls}; 390 linkage, 50, 1, 100, "mouse_panning_sensitivity", Category::Controls};
360 Setting<bool> mouse_enabled{linkage, false, "mouse_enabled", Category::Controls}; 391 Setting<bool> mouse_enabled{linkage, false, "mouse_enabled", Category::Controls};
@@ -410,19 +441,24 @@ struct Values {
410 Setting<std::string> program_args{linkage, std::string(), "program_args", Category::Debugging}; 441 Setting<std::string> program_args{linkage, std::string(), "program_args", Category::Debugging};
411 Setting<bool> dump_exefs{linkage, false, "dump_exefs", Category::Debugging}; 442 Setting<bool> dump_exefs{linkage, false, "dump_exefs", Category::Debugging};
412 Setting<bool> dump_nso{linkage, false, "dump_nso", Category::Debugging}; 443 Setting<bool> dump_nso{linkage, false, "dump_nso", Category::Debugging};
413 Setting<bool> dump_shaders{linkage, false, "dump_shaders", Category::DebuggingGraphics, false}; 444 Setting<bool> dump_shaders{
414 Setting<bool> dump_macros{linkage, false, "dump_macros", Category::DebuggingGraphics, false}; 445 linkage, false, "dump_shaders", Category::DebuggingGraphics, Specialization::Default,
446 false};
447 Setting<bool> dump_macros{
448 linkage, false, "dump_macros", Category::DebuggingGraphics, Specialization::Default, false};
415 Setting<bool> enable_fs_access_log{linkage, false, "enable_fs_access_log", Category::Debugging}; 449 Setting<bool> enable_fs_access_log{linkage, false, "enable_fs_access_log", Category::Debugging};
416 Setting<bool> reporting_services{linkage, false, "reporting_services", Category::Debugging, 450 Setting<bool> reporting_services{
417 false}; 451 linkage, false, "reporting_services", Category::Debugging, Specialization::Default, false};
418 Setting<bool> quest_flag{linkage, false, "quest_flag", Category::Debugging}; 452 Setting<bool> quest_flag{linkage, false, "quest_flag", Category::Debugging};
419 Setting<bool> disable_macro_jit{linkage, false, "disable_macro_jit", 453 Setting<bool> disable_macro_jit{linkage, false, "disable_macro_jit",
420 Category::DebuggingGraphics}; 454 Category::DebuggingGraphics};
421 Setting<bool> disable_macro_hle{linkage, false, "disable_macro_hle", 455 Setting<bool> disable_macro_hle{linkage, false, "disable_macro_hle",
422 Category::DebuggingGraphics}; 456 Category::DebuggingGraphics};
423 Setting<bool> extended_logging{linkage, false, "extended_logging", Category::Debugging, false}; 457 Setting<bool> extended_logging{
458 linkage, false, "extended_logging", Category::Debugging, Specialization::Default, false};
424 Setting<bool> use_debug_asserts{linkage, false, "use_debug_asserts", Category::Debugging}; 459 Setting<bool> use_debug_asserts{linkage, false, "use_debug_asserts", Category::Debugging};
425 Setting<bool> use_auto_stub{linkage, false, "use_auto_stub", Category::Debugging, false}; 460 Setting<bool> use_auto_stub{
461 linkage, false, "use_auto_stub", Category::Debugging, Specialization::Default, false};
426 Setting<bool> enable_all_controllers{linkage, false, "enable_all_controllers", 462 Setting<bool> enable_all_controllers{linkage, false, "enable_all_controllers",
427 Category::Debugging}; 463 Category::Debugging};
428 Setting<bool> create_crash_dumps{linkage, false, "create_crash_dumps", Category::Debugging}; 464 Setting<bool> create_crash_dumps{linkage, false, "create_crash_dumps", Category::Debugging};