From 7a4eb2d54cd0c3038b68fa6268312e4ad93e9cd0 Mon Sep 17 00:00:00 2001 From: Antonis Geralis <43617260+planetis-m@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:29:57 +0200 Subject: [PATCH] Enhance scaling checks for framebuffer and window Add additional checks for render dimensions to prevent scaling issues. --- src/platforms/rcore_desktop_glfw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 1dee13974..06d1c82dc 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -1880,7 +1880,8 @@ static void FramebufferSizeCallback(GLFWwindow *window, int width, int height) // Update scaling/mouse mapping based on actual framebuffer-to-window ratio // (this avoids blurry scaling by rendering at framebuffer resolution while // keeping logical coordinates stable). - if ((CORE.Window.screen.width > 0) && (CORE.Window.screen.height > 0)) + if ((CORE.Window.screen.width > 0) && (CORE.Window.screen.height > 0) && + (CORE.Window.render.width > 0) && (CORE.Window.render.height > 0)) { const float sx = (float)CORE.Window.render.width/(float)CORE.Window.screen.width; const float sy = (float)CORE.Window.render.height/(float)CORE.Window.screen.height;