From cf2099f18a59116e545e15db3e67aa3aee9b2770 Mon Sep 17 00:00:00 2001 From: Moros Smith Date: Sat, 24 May 2025 20:33:27 -0400 Subject: [PATCH] the holy grail --- src/platforms/rcore_web.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index cb77a8575..117a2348e 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -1131,7 +1131,15 @@ int InitPlatform(void) if ((CORE.Window.flags & FLAG_WINDOW_UNDECORATED) > 0) glfwWindowHint(GLFW_DECORATED, GLFW_FALSE); // Border and buttons on Window else glfwWindowHint(GLFW_DECORATED, GLFW_TRUE); // Decorated window - if ((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0) glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // Resizable window + if ((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0) + { + glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // Resizable window + + // bypass hidpi code block in libglfw.js + // https://github.com/raysan5/raylib/pull/4945#issuecomment-2906956170 + //------------------------------------------------------------------------ + glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); + } else glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); // Avoid window being resizable // Disable FLAG_WINDOW_MINIMIZED, not supported on initialization