Ver Fonte

Work around to fix mouse positioning on scaled window

Maicon Santana há 1 mês atrás
pai
commit
73950befca
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      src/platforms/rcore_web.c

+ 2 - 0
src/platforms/rcore_web.c

@@ -1824,6 +1824,8 @@ static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent *
     CORE.Window.screen.width = width;
     CORE.Window.screen.height = height;
 
+    glfwSetWindowSize(platform.handle, CORE.Window.screen.width, CORE.Window.screen.height);
+
     // NOTE: Postprocessing texture is not scaled to new size
 
     return 0;