From 3bad05aa7bd319eaaae937928b396b46f4886e3e Mon Sep 17 00:00:00 2001 From: Arche Washi <166983671+archewashi@users.noreply.github.com> Date: Thu, 31 Oct 2024 03:13:53 +0800 Subject: [PATCH] fix the issue with GetScreenWidth/GetScreenHeight that was identified on other platforms (#4451) --- src/platforms/rcore_desktop_rgfw.c | 3 +++ src/platforms/rcore_web.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/platforms/rcore_desktop_rgfw.c b/src/platforms/rcore_desktop_rgfw.c index 98d4fec7..68885ce3 100644 --- a/src/platforms/rcore_desktop_rgfw.c +++ b/src/platforms/rcore_desktop_rgfw.c @@ -520,6 +520,9 @@ void SetWindowMaxSize(int width, int height) // Set window dimensions void SetWindowSize(int width, int height) { + CORE.Window.screen.width = width; + CORE.Window.screen.height = height; + RGFW_window_resize(platform.window, RGFW_AREA(width, height)); } diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index e15d3f5b..15c0918d 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -667,6 +667,9 @@ void SetWindowMaxSize(int width, int height) // Set window dimensions void SetWindowSize(int width, int height) { + CORE.Window.screen.width = width; + CORE.Window.Screen.height = height; + glfwSetWindowSize(platform.handle, width, height); }