From d277c9d6de752299c0fb0c541c2eb016dfd0d5aa Mon Sep 17 00:00:00 2001 From: asdqwe Date: Sun, 20 Oct 2024 19:58:42 -0300 Subject: [PATCH] Update MaximizeWindow() and RestoreWindow() to set/unset the FLAG_WINDOW_MAXIMIZED --- src/platforms/rcore_web.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index 4d45c3e03..70623166d 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -328,6 +328,8 @@ void MaximizeWindow(void) const int tabHeight = EM_ASM_INT( { return window.innerHeight; }, 0); if (tabWidth && tabHeight) glfwSetWindowSize(platform.handle, tabWidth, tabHeight); + + CORE.Window.flags |= FLAG_WINDOW_MAXIMIZED; } } @@ -343,6 +345,8 @@ void RestoreWindow(void) if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE) { if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight); + + CORE.Window.flags &= ~FLAG_WINDOW_MAXIMIZED; } }