From 5767c4cd059e07355ae5588966d0aee97038a86b Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 4 Jun 2024 23:00:12 +0200 Subject: [PATCH] Update rcore_desktop.c --- src/platforms/rcore_desktop.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c index f0877416..6fe054a8 100644 --- a/src/platforms/rcore_desktop.c +++ b/src/platforms/rcore_desktop.c @@ -1443,15 +1443,12 @@ int InitPlatform(void) else { // No-fullscreen window creation - bool wantWindowedFullscreen = (CORE.Window.screen.height == 0) && (CORE.Window.screen.width == 0); + bool requestWindowedFullscreen = (CORE.Window.screen.height == 0) && (CORE.Window.screen.width == 0); // If we are windowed fullscreen, ensures that window does not minimize when focus is lost. // This hinting code will not work if the user already specified the correct monitor dimensions; // at this point we don't know the monitor's dimensions. (Though, how did the user then?) - if (wantWindowedFullscreen) - { - glfwWindowHint(GLFW_AUTO_ICONIFY, 0); - } + if (requestWindowedFullscreen) glfwWindowHint(GLFW_AUTO_ICONIFY, 0); // Default to at least one pixel in size, as creation with a zero dimension is not allowed. int creationWidth = CORE.Window.screen.width != 0 ? CORE.Window.screen.width : 1; @@ -1471,11 +1468,7 @@ int InitPlatform(void) monitor = monitors[monitorIndex]; SetDimensionsFromMonitor(monitor); - TRACELOG(LOG_INFO, "wantWindowed: %d, size: %dx%d", wantWindowedFullscreen, CORE.Window.screen.width, CORE.Window.screen.height); - if (wantWindowedFullscreen) - { - glfwSetWindowSize(platform.handle, CORE.Window.screen.width, CORE.Window.screen.height); - } + if (requestWindowedFullscreen) glfwSetWindowSize(platform.handle, CORE.Window.screen.width, CORE.Window.screen.height); } else {