Skip to content

Commit

Permalink
Update vsync after settings close
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Oct 21, 2022
1 parent 3877651 commit 8ba8855
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1993,15 +1993,9 @@ void VulkanRenderer::QueryAvailableFormats()

void VulkanRenderer::EnableVSync(int state)
{
if (m_vsync_state == (VSync)state)
return;

m_vsync_state = (VSync)state;

// recreate spawn chains (vsync state is checked from config in ChooseSwapPresentMode)
RecreateSwapchain(true);
if (m_padSwapchainInfo)
RecreateSwapchain(false);
// todo: cannot recreate swapchain from a UI thread
wxMessageBox(_("Changing vulkan vsync mode requires restart."));
return;
}

bool VulkanRenderer::ImguiBegin(bool mainWindow)
Expand Down

0 comments on commit 8ba8855

Please sign in to comment.