Browse Source

inform glfw that a change of window size has taken place

pull/4945/head
Moros Smith 2 months ago
parent
commit
d0d42e78ea
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/platforms/rcore_web.c

+ 2
- 0
src/platforms/rcore_web.c View File

@ -1692,6 +1692,8 @@ static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent *
emscripten_set_canvas_element_size(GetCanvasId(), width, height); 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 SetupViewport(width, height); // Reset viewport and projection matrix for new size
CORE.Window.currentFbo.width = width; CORE.Window.currentFbo.width = width;

Loading…
Cancel
Save