diff options
Diffstat (limited to 'src/window.cpp')
| -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; |
