From 0033bbb6bf844a4b2c7aaa02a2b2d0d9fe2567cd Mon Sep 17 00:00:00 2001 From: MrDiver Date: Sat, 28 Aug 2021 15:40:41 +0200 Subject: [PATCH] Fixing glfw premature resizing issue when using a different monitor to start the application --- src/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core.c b/src/core.c index aff8cdd35..2eab317c7 100644 --- a/src/core.c +++ b/src/core.c @@ -3792,6 +3792,9 @@ static bool InitGraphicsDevice(int width, int height) if (CORE.Window.handle) { #if defined(PLATFORM_DESKTOP) + // Set Window size again to prevent GLFW resizing if a different monitor than the primary monitor + // is used for starting the application + glfwSetWindowSize(CORE.Window.handle,CORE.Window.screen.width,CORE.Window.screen.height); // Center window on screen int windowPosX = CORE.Window.display.width/2 - CORE.Window.screen.width/2; int windowPosY = CORE.Window.display.height/2 - CORE.Window.screen.height/2;