From 6711f4b6e0eace5228fa2ec28fc2fdad12628097 Mon Sep 17 00:00:00 2001 From: pupbrained Date: Sun, 6 Oct 2024 16:19:29 -0400 Subject: [PATCH] oops --- src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 142656d..a123e5c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -702,10 +702,12 @@ class VulkanApp { u32 width = 0, height = 0; std::tie(width, height) = mWindow->getFramebufferSize(); - vk::Extent2D actualExtent = { - std::clamp(actualExtent.width, capabilities.minImageExtent.width, capabilities.maxImageExtent.width), - std::clamp(actualExtent.height, capabilities.minImageExtent.height, capabilities.maxImageExtent.height) - }; + vk::Extent2D actualExtent = { width, height }; + + actualExtent.width = + std::clamp(actualExtent.width, capabilities.minImageExtent.width, capabilities.maxImageExtent.width); + actualExtent.height = + std::clamp(actualExtent.height, capabilities.minImageExtent.height, capabilities.maxImageExtent.height); return actualExtent; }