emscripten: Add JS library dependencies using EM_JS_DEPS macro

See https://github.com/emscripten-core/emscripten/pull/19780

(cherry picked from commit 042243471f)
This commit is contained in:
Sam Clegg authored and Ryan C. Gordon committed 2023-07-06 19:32:05 -04:00
1 parent 95033e87e1
commit b42cb1c6f2
5 files changed
+10 -7

No files matched your search

+3 -5
View File
@@ -24,12 +24,10 @@
#include <emscripten/emscripten.h>
EM_JS_DEPS(sdlsysurl, "$UTF8ToString");
int SDL_SYS_OpenURL(const char *url)
{
EM_ASM({
window.open(UTF8ToString($0), "_blank");
},
url);
EM_ASM(window.open(UTF8ToString($0), "_blank"), url);
return 0;
}