diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-22 11:24:54 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-22 11:24:54 -0400 |
| commit | 08751c3863d95f0ef1f53f7d5326adfeb49bfbd6 (patch) | |
| tree | 5c98dc2330b0724ae586705537df97aaccd2194c | |
| parent | c3b54d24cdf054e4f8733f3cb1669a83398626f7 (diff) | |
pke: resize if height changes
| -rw-r--r-- | src/window.cpp | 7 |
1 files 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; |
