Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
ed5e0499ff

+ 2 - 0
platform/javascript/detect.py

@@ -212,6 +212,8 @@ def configure(env):
             sys.exit(255)
             sys.exit(255)
         env.Append(CCFLAGS=["-s", "RELOCATABLE=1"])
         env.Append(CCFLAGS=["-s", "RELOCATABLE=1"])
         env.Append(LINKFLAGS=["-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
         env.extra_suffix = ".gdnative" + env.extra_suffix
 
 
     # Reduce code size by generating less support code (e.g. skip NodeJS support).
     # 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');
 		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) {
 	godot_js_display_window_size_get: function (p_width, p_height) {
 		GodotRuntime.setHeapValue(p_width, GodotConfig.canvas.width, 'i32');
 		GodotRuntime.setHeapValue(p_width, GodotConfig.canvas.width, 'i32');
 		GodotRuntime.setHeapValue(p_height, GodotConfig.canvas.height, 'i32');
 		GodotRuntime.setHeapValue(p_height, GodotConfig.canvas.height, 'i32');