From 8ef6473d33f3b81e0c31bcc467c4ab6c594299e3 Mon Sep 17 00:00:00 2001 From: Moros Smith Date: Sun, 25 May 2025 18:58:19 -0400 Subject: [PATCH] return to ray's expected resize behavior --- src/platforms/rcore_web.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index 117a2348e..2e3ba9a17 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -1692,8 +1692,8 @@ static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent * // This event is called whenever the window changes sizes, // so the size of the canvas object is explicitly retrieved below - int width = EM_ASM_INT( return (!!document.fullscreenElement) ? window.innerWidth : Module.canvas.parentElement.clientWidth; ); - int height = EM_ASM_INT( return (!!document.fullscreenElement) ? window.innerHeight : Module.canvas.parentElement.clientHeight; ); + int width = EM_ASM_INT( return window.innerWidth; ); + int height = EM_ASM_INT( return window.innerHeight; ); if (width < (int)CORE.Window.screenMin.width) width = CORE.Window.screenMin.width; else if ((width > (int)CORE.Window.screenMax.width) && (CORE.Window.screenMax.width > 0)) width = CORE.Window.screenMax.width;