From 6731129670ec4aa984b9951817c60ae6de6daf19 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Wed, 15 Apr 2026 14:58:12 -0500 Subject: [PATCH] main: support for Wayland surfaceCapabilities --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a1f8177..fa77cb2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -200,6 +200,10 @@ void recreateSwapchain(VkSurfaceFormatKHR surfaceFormat, VkFormat depthFormat, V .width = surfaceCapabilities.currentExtent.width, .height = surfaceCapabilities.currentExtent.height, }; + if ((imageExtent.width == ~0u) && (imageExtent.width == ~0u)) { + imageExtent.width = windowSize.x; + imageExtent.height = windowSize.y; + } VkFormat imageFormat{ surfaceFormat.format }; VkColorSpaceKHR imageColorSpace{ surfaceFormat.colorSpace };