VERY experimental Nintendo Switch 2 emulator
C++
Make vsync setting work for Vulkan
DJRobX705c6c16b99f
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cppindex fa8efd22ec..a69ae7725e 100644--- a/src/video_core/renderer_vulkan/vk_swapchain.cpp+++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp@@ -33,9 +33,10 @@ VkSurfaceFormatKHR ChooseSwapSurfaceFormat(vk::Span<VkSurfaceFormatKHR> formats)}VkPresentModeKHR ChooseSwapPresentMode(vk::Span<VkPresentModeKHR> modes) {- // Mailbox doesn't lock the application like fifo (vsync), prefer it+ // Mailbox (triple buffering) doesn't lock the application like fifo (vsync),+ // prefer it if vsync option is not selectedconst auto found_mailbox = std::find(modes.begin(), modes.end(), VK_PRESENT_MODE_MAILBOX_KHR);- if (found_mailbox != modes.end()) {+ if (found_mailbox != modes.end() && !Settings::values.use_vsync.GetValue()) {return VK_PRESENT_MODE_MAILBOX_KHR;}if (!Settings::values.use_speed_limit.GetValue()) {diff --git a/src/yuzu/configuration/configure_graphics_advanced.ui b/src/yuzu/configuration/configure_graphics_advanced.uiindex 96de0b3d10..d6d8193647 100644--- a/src/yuzu/configuration/configure_graphics_advanced.ui+++ b/src/yuzu/configuration/configure_graphics_advanced.ui@@ -75,7 +75,7 @@<string>VSync prevents the screen from tearing, but some graphics cards have lower performance with VSync enabled. Keep it enabled if you don't notice a performance difference.</string></property><property name="text">- <string>Use VSync (OpenGL only)</string>+ <string>Use VSync</string></property></widget></item>