mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
emscripten: Use MODULARIZE=1
This commit is contained in:
+5
-1
@@ -159,6 +159,8 @@ if (EMSCRIPTEN)
|
||||
|
||||
target_link_options(xsystem35 PRIVATE
|
||||
-sENVIRONMENT=web
|
||||
-sMODULARIZE=1
|
||||
-sEXPORT_ES6=1
|
||||
-sASYNCIFY=1
|
||||
-sASYNCIFY_IGNORE_INDIRECT=1
|
||||
-sASYNCIFY_REMOVE=SDL_Delay
|
||||
@@ -167,7 +169,9 @@ if (EMSCRIPTEN)
|
||||
-sALLOW_MEMORY_GROWTH=1
|
||||
-sNO_EXIT_RUNTIME=1
|
||||
-sEXPORTED_FUNCTIONS=_main,_malloc
|
||||
-sEXPORTED_RUNTIME_METHODS=getValue,addRunDependency,removeRunDependency)
|
||||
-sEXPORTED_RUNTIME_METHODS=FS,IDBFS,getValue,addRunDependency,removeRunDependency
|
||||
--emit-tsd=xsystem35.d.ts
|
||||
)
|
||||
|
||||
elseif (ANDROID)
|
||||
target_link_libraries(xsystem35 PRIVATE ${ndk_log})
|
||||
|
||||
@@ -37,15 +37,15 @@ EM_JS(int, muspcm_reset, (void), {
|
||||
});
|
||||
|
||||
EM_JS(int, muspcm_load_no, (int slot, int no), { // async
|
||||
return xsystem35.audio.pcm_load(slot, no);
|
||||
return Asyncify.handleSleep((wakeUp) => xsystem35.audio.pcm_load(slot, no, wakeUp));
|
||||
});
|
||||
|
||||
EM_JS(int, muspcm_load_data, (int slot, uint8_t *buf, uint32_t len), { // async
|
||||
return xsystem35.audio.pcm_load_data(slot, buf, len);
|
||||
return Asyncify.handleSleep((wakeUp) => xsystem35.audio.pcm_load_data(slot, buf, len, wakeUp));
|
||||
});
|
||||
|
||||
EM_JS(int, muspcm_load_mixlr, (int slot, int noL, int noR), { // async
|
||||
return xsystem35.audio.pcm_load_mixlr(slot, noL, noR);
|
||||
return Asyncify.handleSleep((wakeUp) => xsystem35.audio.pcm_load_mixlr(slot, noL, noR, wakeUp));
|
||||
});
|
||||
|
||||
EM_JS(int, muspcm_unload, (int slot), {
|
||||
@@ -92,5 +92,5 @@ EM_JS(boolean, muspcm_isplaying, (int slot), {
|
||||
});
|
||||
|
||||
EM_JS(int, muspcm_waitend, (int slot), { // async
|
||||
return xsystem35.audio.pcm_waitend(slot);
|
||||
return Asyncify.handleSleep((wakeUp) => xsystem35.audio.pcm_waitend(slot, wakeUp));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user