diff options
| author | Andre Weissflog <floooh@gmail.com> | 2022-10-15 17:53:28 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2022-10-15 17:53:28 +0200 |
| commit | 909683255f742d101cd187491db81e2d1cdcb3c7 (patch) | |
| tree | 5c8cf8018ea0742a280894473126833f5dc02bc5 | |
| parent | cf61d7d1237950d75ebf3111ba5d394ba776c704 (diff) | |
emscripten: use new EM_JS_DEPS() macro to declare JS function dependencies
| -rw-r--r-- | sokol_app.h | 4 | ||||
| -rw-r--r-- | sokol_args.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sokol_app.h b/sokol_app.h index 5d70a246..2a8a27d8 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -4435,6 +4435,10 @@ _SOKOL_PRIVATE void _sapp_ios_show_keyboard(bool shown) { /*== EMSCRIPTEN ==============================================================*/ #if defined(_SAPP_EMSCRIPTEN) +#if defined(EM_JS_DEPS) +EM_JS_DEPS(sokol_app, "$withStackSave,$allocateUTF8OnStack"); +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/sokol_args.h b/sokol_args.h index 7cb93834..b5efabec 100644 --- a/sokol_args.h +++ b/sokol_args.h @@ -692,6 +692,11 @@ _SOKOL_PRIVATE bool _sargs_parse_cargs(int argc, const char** argv) { #ifdef __cplusplus extern "C" { #endif + +#if defined(EM_JS_DEPS) +EM_JS_DEPS(sokol_audio, "$withStackSave,$allocateUTF8OnStack"); +#endif + EMSCRIPTEN_KEEPALIVE void _sargs_add_kvp(const char* key, const char* val) { SOKOL_ASSERT(_sargs.valid && key && val); if (_sargs.num_args >= _sargs.max_args) { |