瀏覽代碼

Merge pull request #60734 from Faless/js/4.x_sig_other_sig

[HTML5] Disable zstd weak symbols, add missing JS signature.
Rémi Verschelde 3 年之前
父節點
當前提交
ed5e0499ff
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 2 0
      platform/javascript/detect.py
  2. 1 0
      platform/javascript/js/libs/library_godot_display.js

+ 2 - 0
platform/javascript/detect.py

@@ -212,6 +212,8 @@ def configure(env):
             sys.exit(255)
         env.Append(CCFLAGS=["-s", "RELOCATABLE=1"])
         env.Append(LINKFLAGS=["-s", "RELOCATABLE=1"])
+        # Weak symbols are broken upstream: https://github.com/emscripten-core/emscripten/issues/12819
+        env.Append(CPPDEFINES=["ZSTD_HAVE_WEAK_SYMBOLS=0"])
         env.extra_suffix = ".gdnative" + env.extra_suffix
 
     # Reduce code size by generating less support code (e.g. skip NodeJS support).

+ 1 - 0
platform/javascript/js/libs/library_godot_display.js

@@ -462,6 +462,7 @@ const GodotDisplay = {
 		GodotRuntime.setHeapValue(height, window.screen.height * scale, 'i32');
 	},
 
+	godot_js_display_window_size_get__sig: 'vii',
 	godot_js_display_window_size_get: function (p_width, p_height) {
 		GodotRuntime.setHeapValue(p_width, GodotConfig.canvas.width, 'i32');
 		GodotRuntime.setHeapValue(p_height, GodotConfig.canvas.height, 'i32');