Explorar o código

[core] SetWindowSize() try to support PLATFORM_WEB -WIP-

Ray %!s(int64=5) %!d(string=hai) anos
pai
achega
32e374d941
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/core.c

+ 8 - 0
src/core.c

@@ -974,6 +974,14 @@ void SetWindowSize(int width, int height)
 #if defined(PLATFORM_DESKTOP)
     glfwSetWindowSize(CORE.Window.handle, width, height);
 #endif
+#if defined(PLATFORM_WEB)
+    emscripten_set_canvas_size(width, height);  // DEPRECATED!
+    
+    // TODO: Below functions should be used to replace previous one but
+    // they do not seem to work properly
+    //emscripten_set_canvas_element_size("canvas", width, height);
+    //emscripten_set_element_css_size("canvas", width, height);
+#endif
 }
 
 // Show the window