mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 17:19:18 +01:00
Attempt to fix flicker on resize, don't recreate if image was already acquired. (#522)
This commit is contained in:
parent
3a94a276da
commit
f4c2d16a3a
@ -2540,12 +2540,12 @@ bool VulkanRenderer::AcquireNextSwapchainImage(bool mainWindow)
|
||||
|
||||
auto& chainInfo = GetChainInfo(mainWindow);
|
||||
|
||||
if (!UpdateSwapchainProperties(mainWindow))
|
||||
return false;
|
||||
|
||||
if (chainInfo.swapchainImageIndex != -1)
|
||||
return true; // image already reserved
|
||||
|
||||
if (!UpdateSwapchainProperties(mainWindow))
|
||||
return false;
|
||||
|
||||
vkResetFences(m_logicalDevice, 1, &chainInfo.m_imageAvailableFence);
|
||||
VkResult result = vkAcquireNextImageKHR(m_logicalDevice, chainInfo.swapchain, std::numeric_limits<uint64_t>::max(), VK_NULL_HANDLE, chainInfo.m_imageAvailableFence, &chainInfo.swapchainImageIndex);
|
||||
if (result != VK_SUCCESS)
|
||||
|
Loading…
Reference in New Issue
Block a user