From 08751c3863d95f0ef1f53f7d5326adfeb49bfbd6 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Mon, 22 Sep 2025 11:24:54 -0400 Subject: pke: resize if height changes --- src/window.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 64276c7..166326d 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -4136,11 +4136,10 @@ void DetermineMonitor() { void RecreateSwapchain() { pkeSettings.rt.was_framebuffer_resized = true; int width, height = 0; - glfwGetFramebufferSize(window, &width, &height); - while (width == 0 || height == 0) { + do { glfwGetFramebufferSize(window, &width, &height); glfwWaitEvents(); - } + } while (width == 0 || height == 0); Extent.width = width; Extent.height = height; ActiveCamera->stale = ActiveCamera->stale | PKE_CAMERA_STALE_PERSPECTIVE; @@ -4175,7 +4174,7 @@ void FramebufferResizeCallback(GLFWwindow *window, int width, int height) { (void)window; assert(width > -1); assert(height > -1); - if (Extent.width == (uint32_t)width && Extent.height != (uint32_t)height) { + if (Extent.width == (uint32_t)width && Extent.height == (uint32_t)height) { return; } shouldRecreateSwapchain = true; -- cgit v1.2.3