Skip to content

Commit

Permalink
fix yet another issue that would freeze presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Nov 1, 2023
1 parent ca22fea commit d9f486d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Cafe/HW/Latte/Renderer/Vulkan/SwapchainInfoVk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ VkExtent2D SwapchainInfoVk::ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& cap
VkPresentModeKHR SwapchainInfoVk::ChoosePresentMode(const std::vector<VkPresentModeKHR>& modes)
{
const auto vsyncState = (VSync)GetConfig().vsync.GetValue();
LatteTiming_DisableHostDrivenVSync();
if(mainWindow)
LatteTiming_DisableHostDrivenVSync();
if (vsyncState == VSync::MAILBOX)
{
if (std::find(modes.cbegin(), modes.cend(), VK_PRESENT_MODE_MAILBOX_KHR) != modes.cend())
Expand All @@ -393,7 +394,8 @@ VkPresentModeKHR SwapchainInfoVk::ChoosePresentMode(const std::vector<VkPresentM
cemuLog_log(LogType::Force, "Vulkan: Can't find immediate present mode");
}

LatteTiming_EnableHostDrivenVSync();
if(mainWindow)
LatteTiming_EnableHostDrivenVSync();
return VK_PRESENT_MODE_FIFO_KHR;
}

Expand Down

0 comments on commit d9f486d

Please sign in to comment.