소스 검색

inform glfw that a change of window size has taken place

Moros Smith 4 달 전
부모
커밋
d0d42e78ea
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/platforms/rcore_web.c

+ 2 - 0
src/platforms/rcore_web.c

@@ -1692,6 +1692,8 @@ static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent *
 
     emscripten_set_canvas_element_size(GetCanvasId(), width, height);
 
+    glfwSetWindowSize(platform.handle, width, height); // inform glfw of the new size
+
     SetupViewport(width, height); // Reset viewport and projection matrix for new size
 
     CORE.Window.currentFbo.width = width;