diff --git a/en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc b/en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc index 6d3792f8..9904c6b0 100644 --- a/en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc +++ b/en/03_Drawing_a_triangle/04_Swap_chain_recreation.adoc @@ -108,7 +108,6 @@ Both `VK_SUCCESS` and `VK_SUBOPTIMAL_KHR` are considered "success" return codes. ---- result = presentQueue.presentKHR( presentInfoKHR ); if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR) { - framebufferResized = false; recreateSwapChain(); } else if (result != vk::Result::eSuccess) { throw std::runtime_error("failed to present swap chain image!"); @@ -169,7 +168,7 @@ The `drawFrame` function should then be modified to also check for this flag: [,c++] ---- -if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR) { +if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR || framebufferResized) { framebufferResized = false; recreateSwapChain(); } else if (result != vk::Result::eSuccess) {