From 8b939a9dab0f8ccbc8823daf0187e6bd4a604d24 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Thu, 15 May 2025 13:21:57 +0100 Subject: [PATCH] video_core: Fixed incorrect Vulkan mode when speed unthrottled w/ vsync When the frame limit was set to 0 (unthrottled), the Vulkan present mode would be unintentionally set to FIFO, which caps out at the monitor's refresh rate --- src/video_core/renderer_vulkan/vk_swapchain.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index 8c4725917..12678953f 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -183,9 +183,12 @@ void Swapchain::SetPresentMode() { has_immediate ? vk::PresentModeKHR::eImmediate : vk::PresentModeKHR::eMailbox; return; } + + const auto frame_limit = Settings::GetFrameLimit(); + // If vsync is enabled attempt to use mailbox mode in case the user wants to speedup/slowdown // the game. If mailbox is not available use immediate and warn about it. - if (use_vsync && Settings::GetFrameLimit() > 100) { + if (use_vsync && (frame_limit > 100 || frame_limit == 0)) { // 0 = unthrottled present_mode = has_mailbox ? vk::PresentModeKHR::eMailbox : vk::PresentModeKHR::eImmediate; if (!has_mailbox) { LOG_WARNING(