Skip to content

Commit cb51ed3

Browse files
committed
Fix frame buffer callback not using same validation check on minimized windows
1 parent 1505cff commit cb51ed3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

engine/system/win/sys_video.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,13 @@ bool sys_video_c::IsActive()
668668
return glfwGetWindowAttrib(wnd, GLFW_FOCUSED);
669669
}
670670

671-
void sys_video_c::FramebufferSizeChanged(int width, int height) {
672-
vid.fbSize[0] = width;
673-
vid.fbSize[1] = height;
671+
void sys_video_c::FramebufferSizeChanged(int width, int height)
672+
{
673+
// Avoid persisting an invalid window size from being minimized.
674+
if (!glfwGetWindowAttrib(wnd, GLFW_ICONIFIED)) {
675+
vid.fbSize[0] = width;
676+
vid.fbSize[1] = height;
677+
}
674678
}
675679

676680
void sys_video_c::SizeChanged(int width, int height, bool max)

0 commit comments

Comments
 (0)