summaryrefslogtreecommitdiff
path: root/src/common/settings.h
diff options
context:
space:
mode:
authorGravatar lat9nq2023-04-30 15:39:00 -0400
committerGravatar lat9nq2023-05-02 21:51:29 -0400
commit6f0929df82be77f116988cf16cde4ebbc5f978dc (patch)
treeb12668b13bce18dc9b628cf77b2d935ca0ab4f71 /src/common/settings.h
parentMerge pull request #9973 from GPUCode/async-present (diff)
downloadyuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.gz
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.xz
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.zip
configuration: Expose separate swap present modes
Previously, yuzu would try and guess which vsync mode to use given different scenarios, but apparently we didn't always get it right. This exposes the separate modes in a drop-down the user can select. If a mode isn't available in Vulkan, it defaults to FIFO.
Diffstat (limited to 'src/common/settings.h')
-rw-r--r--src/common/settings.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index 5379d0dd5..2371495e4 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -16,6 +16,12 @@
16 16
17namespace Settings { 17namespace Settings {
18 18
19enum class VSyncMode : u32 {
20 Immediate,
21 FIFO,
22 Mailbox,
23};
24
19enum class RendererBackend : u32 { 25enum class RendererBackend : u32 {
20 OpenGL = 0, 26 OpenGL = 0,
21 Vulkan = 1, 27 Vulkan = 1,
@@ -455,7 +461,8 @@ struct Values {
455 SwitchableSetting<NvdecEmulation> nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"}; 461 SwitchableSetting<NvdecEmulation> nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"};
456 SwitchableSetting<bool> accelerate_astc{true, "accelerate_astc"}; 462 SwitchableSetting<bool> accelerate_astc{true, "accelerate_astc"};
457 SwitchableSetting<bool> async_astc{false, "async_astc"}; 463 SwitchableSetting<bool> async_astc{false, "async_astc"};
458 SwitchableSetting<bool> use_vsync{true, "use_vsync"}; 464 Setting<VSyncMode, true> vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::Mailbox,
465 "use_vsync"};
459 SwitchableSetting<ShaderBackend, true> shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL, 466 SwitchableSetting<ShaderBackend, true> shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL,
460 ShaderBackend::SPIRV, "shader_backend"}; 467 ShaderBackend::SPIRV, "shader_backend"};
461 SwitchableSetting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"}; 468 SwitchableSetting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"};