Skip to content

Commit 050042b

Browse files
committed
[rcore][GLFW] Drop unused refresh rate when calling glfwSetWindowMonitor()
the glfw documentation clearly says - When the monitor is NULL, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is specified. so it' useless to pass a refreshrate, not to mention we are already doing it in https://github.com/raysan5/raylib/blob/63f82f0ca873f762ffea0c83ed14e461a905b7fc/src/platforms/rcore_desktop_glfw.c#L241 Signed-off-by: tillua467 <tillua467@gmail.com>
1 parent dda51b7 commit 050042b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/platforms/rcore_desktop_glfw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void ToggleBorderlessWindowed(void)
288288

289289
// Set screen position and size
290290
glfwSetWindowMonitor(platform.handle, NULL, CORE.Window.position.x, CORE.Window.position.y,
291-
CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate);
291+
CORE.Window.screen.width, CORE.Window.screen.height, GLFW_DONT_CARE);
292292

293293
// Refocus window
294294
glfwFocusWindow(platform.handle);
@@ -318,7 +318,7 @@ void ToggleBorderlessWindowed(void)
318318

319319
// Return to previous screen size and position
320320
glfwSetWindowMonitor(platform.handle, NULL, CORE.Window.position.x, CORE.Window.position.y,
321-
CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate);
321+
CORE.Window.screen.width, CORE.Window.screen.height, GLFW_DONT_CARE);
322322

323323
// Refocus window
324324
glfwFocusWindow(platform.handle);

0 commit comments

Comments
 (0)