mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00:00
Vulkan: Only use oldSwapchain in response to VK_ERROR_OUT_OF_DATE_KHR
Seems to be required on the latest NV driver, otherwise the presented images are never shown.
This commit is contained in:
parent
cdf34a79f7
commit
4301b8538d
5 changed files with 31 additions and 31 deletions
|
@ -472,14 +472,27 @@ bool SwapChain::ResizeSwapChain()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool SwapChain::RecreateSwapChain()
|
||||
{
|
||||
DestroySwapChainImages();
|
||||
DestroySwapChain();
|
||||
if (!CreateSwapChain() || !SetupSwapChainImages())
|
||||
{
|
||||
PanicAlert("Failed to re-configure swap chain images, this is fatal (for now)");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SwapChain::SetVSync(bool enabled)
|
||||
{
|
||||
if (m_vsync_enabled == enabled)
|
||||
return true;
|
||||
|
||||
// Resizing recreates the swap chain with the new present mode.
|
||||
// Recreate the swap chain with the new present mode.
|
||||
m_vsync_enabled = enabled;
|
||||
return ResizeSwapChain();
|
||||
return RecreateSwapChain();
|
||||
}
|
||||
|
||||
bool SwapChain::RecreateSurface(void* native_handle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue