X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=196e15dc72d8777dacefdff7d390f4825a071687;hb=a534d294e41a0bc2c5e77e7b12786f8d0a9b5ae1;hp=ea8288e033870af9f9e2308300a5850a993b40d7;hpb=59cc2c3d3bd985cc378f9cc6bfae6c5ebdb32e78;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index ea8288e0..196e15dc 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -273,7 +273,7 @@ void InitGfxClipRegion(boolean enabled, int x, int y, int width, int height) gfx.clip_height = height; } -void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void)) +void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(boolean)) { gfx.draw_busy_anim_function = draw_busy_anim_function; } @@ -1908,17 +1908,19 @@ void InitEmscriptenFilesystem(void) { #if defined(PLATFORM_EMSCRIPTEN) EM_ASM - ( + ({ + dir = UTF8ToString($0); + Module.sync_done = 0; - FS.mkdir('/persistent'); // create persistent data directory - FS.mount(IDBFS, {}, '/persistent'); // mount with IDBFS filesystem type + FS.mkdir(dir); // create persistent data directory + FS.mount(IDBFS, {}, dir); // mount with IDBFS filesystem type FS.syncfs(true, function(err) // sync persistent data into memory { assert(!err); Module.sync_done = 1; }); - ); + }, PERSISTENT_DIRECTORY); // wait for persistent data to be synchronized to memory while (emscripten_run_script_int("Module.sync_done") == 0)