Skip to content

Commit cf2099f

Browse files
committed
the holy grail
1 parent 358917f commit cf2099f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/platforms/rcore_web.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,15 @@ int InitPlatform(void)
11311131
if ((CORE.Window.flags & FLAG_WINDOW_UNDECORATED) > 0) glfwWindowHint(GLFW_DECORATED, GLFW_FALSE); // Border and buttons on Window
11321132
else glfwWindowHint(GLFW_DECORATED, GLFW_TRUE); // Decorated window
11331133

1134-
if ((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0) glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // Resizable window
1134+
if ((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0)
1135+
{
1136+
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); // Resizable window
1137+
1138+
// bypass hidpi code block in libglfw.js
1139+
// https://github.com/raysan5/raylib/pull/4945#issuecomment-2906956170
1140+
//------------------------------------------------------------------------
1141+
glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);
1142+
}
11351143
else glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); // Avoid window being resizable
11361144

11371145
// Disable FLAG_WINDOW_MINIMIZED, not supported on initialization

0 commit comments

Comments
 (0)