summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-09-22 11:24:54 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-09-22 11:24:54 -0400
commit08751c3863d95f0ef1f53f7d5326adfeb49bfbd6 (patch)
tree5c98dc2330b0724ae586705537df97aaccd2194c
parentc3b54d24cdf054e4f8733f3cb1669a83398626f7 (diff)
pke: resize if height changes
-rw-r--r--src/window.cpp7
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;