Просмотр исходного кода

Work around to fix mouse positioning on scaled window

Maicon Santana 1 месяц назад
Родитель
Сommit
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.height = height;
 
+    glfwSetWindowSize(platform.handle, CORE.Window.screen.width, CORE.Window.screen.height);
+
     // NOTE: Postprocessing texture is not scaled to new size
 
     return 0;