summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-04-30 21:39:00 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-03 03:51:29 +0200
commit6f0929df82be77f116988cf16cde4ebbc5f978dc (patch)
treeb12668b13bce18dc9b628cf77b2d935ca0ab4f71 /src/common
parentMerge pull request #9973 from GPUCode/async-present (diff)
downloadyuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.gz
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.bz2
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.lz
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.xz
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.tar.zst
yuzu-6f0929df82be77f116988cf16cde4ebbc5f978dc.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/settings.cpp3
-rw-r--r--src/common/settings.h9
2 files changed, 9 insertions, 3 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 77ff21128..92794f4a2 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -60,7 +60,7 @@ void LogSettings() {
log_setting("Renderer_NvdecEmulation", values.nvdec_emulation.GetValue());
log_setting("Renderer_AccelerateASTC", values.accelerate_astc.GetValue());
log_setting("Renderer_AsyncASTC", values.async_astc.GetValue());
- log_setting("Renderer_UseVsync", values.use_vsync.GetValue());
+ log_setting("Renderer_UseVsync", values.vsync_mode.GetValue());
log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue());
log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue());
log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue());
@@ -222,7 +222,6 @@ void RestoreGlobalState(bool is_powered_on) {
values.nvdec_emulation.SetGlobal(true);
values.accelerate_astc.SetGlobal(true);
values.async_astc.SetGlobal(true);
- values.use_vsync.SetGlobal(true);
values.shader_backend.SetGlobal(true);
values.use_asynchronous_shaders.SetGlobal(true);
values.use_fast_gpu_time.SetGlobal(true);
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 @@
namespace Settings {
+enum class VSyncMode : u32 {
+ Immediate,
+ FIFO,
+ Mailbox,
+};
+
enum class RendererBackend : u32 {
OpenGL = 0,
Vulkan = 1,
@@ -455,7 +461,8 @@ struct Values {
SwitchableSetting<NvdecEmulation> nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"};
SwitchableSetting<bool> accelerate_astc{true, "accelerate_astc"};
SwitchableSetting<bool> async_astc{false, "async_astc"};
- SwitchableSetting<bool> use_vsync{true, "use_vsync"};
+ Setting<VSyncMode, true> vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::Mailbox,
+ "use_vsync"};
SwitchableSetting<ShaderBackend, true> shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL,
ShaderBackend::SPIRV, "shader_backend"};
SwitchableSetting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"};