소스 검색

fix the issue with GetScreenWidth/GetScreenHeight that was identified on other platforms (#4451)

Arche Washi 10 달 전
부모
커밋
3bad05aa7b
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/platforms/rcore_desktop_rgfw.c
  2. 3 0
      src/platforms/rcore_web.c

+ 3 - 0
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));
 }
 

+ 3 - 0
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);
 }