瀏覽代碼

Work around to fix mouse positioning on scaled window

Maicon Santana 1 月之前
父節點
當前提交
73950befca
共有 1 個文件被更改,包括 2 次插入0 次删除
  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.width = width;
     CORE.Window.screen.height = height;
     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
     // NOTE: Postprocessing texture is not scaled to new size
 
 
     return 0;
     return 0;