Skip to content

Commit 8c99a50

Browse files
committed
REVIEWED: WindowSizeCallback(), GLFW
It is called on window minification and setting internal width/height to 0, that can break things
1 parent a51d334 commit 8c99a50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/platforms/rcore_desktop_glfw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,6 +1752,10 @@ static void ErrorCallback(int error, const char *description)
17521752
// NOTE: Window resizing not enabled by default, use SetConfigFlags()
17531753
static void WindowSizeCallback(GLFWwindow *window, int width, int height)
17541754
{
1755+
// WARNING: On window minimization, callback is called,
1756+
// but we don't want to change internal screen values, it breaks things
1757+
if ((width == 0) || (height == 0)) return;
1758+
17551759
// Reset viewport and projection matrix for new size
17561760
SetupViewport(width, height);
17571761

0 commit comments

Comments
 (0)