diff --git a/src/vulkan/vulkan_presenter.cpp b/src/vulkan/vulkan_presenter.cpp index 94546a83a..c760bb1b2 100644 --- a/src/vulkan/vulkan_presenter.cpp +++ b/src/vulkan/vulkan_presenter.cpp @@ -106,8 +106,8 @@ namespace dxvk::vk { if ((status = m_vki->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_device.adapter, m_surface, &caps)) != VK_SUCCESS) { - while (status == VK_ERROR_SURFACE_LOST_KHR) { - // Recreate the surface and try again. + for (uint32_t i = 0; i < 5 && status == VK_ERROR_SURFACE_LOST_KHR; i++) { + // Recreate the surface and try again. Give up after 5 tries. if (m_surface) destroySurface(); if ((status = createSurface()) != VK_SUCCESS)