From cb51ed36562c8f6e4d2283a3e7737c6157b40652 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Mon, 3 Nov 2025 00:59:33 -0600 Subject: [PATCH] Fix frame buffer callback not using same validation check on minimized windows --- engine/system/win/sys_video.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/engine/system/win/sys_video.cpp b/engine/system/win/sys_video.cpp index e015fa9..6f61bff 100644 --- a/engine/system/win/sys_video.cpp +++ b/engine/system/win/sys_video.cpp @@ -668,9 +668,13 @@ bool sys_video_c::IsActive() return glfwGetWindowAttrib(wnd, GLFW_FOCUSED); } -void sys_video_c::FramebufferSizeChanged(int width, int height) { - vid.fbSize[0] = width; - vid.fbSize[1] = height; +void sys_video_c::FramebufferSizeChanged(int width, int height) +{ + // Avoid persisting an invalid window size from being minimized. + if (!glfwGetWindowAttrib(wnd, GLFW_ICONIFIED)) { + vid.fbSize[0] = width; + vid.fbSize[1] = height; + } } void sys_video_c::SizeChanged(int width, int height, bool max)