diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-18 17:46:30 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-18 17:56:13 -0800 |
commit | 133b7ebbdd39cfa04231d39e84ee178db9dd527b (patch) | |
tree | ba2d148890b471b851d6bb5d3607c350007ffddb /system | |
parent | 9a864d50be044455bcb7626898e58abc406215d9 (diff) |
add a version of emscripten_set_main_loop where the main loop takes an argument; fixes #2114
Diffstat (limited to 'system')
-rw-r--r-- | system/include/emscripten/emscripten.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 426206c4..b92d920c 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -116,6 +116,9 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v * asynchronous callbacks, but you must pause the main * loop until they complete. * + * If you want your main loop function to receive a void* + * argument, use emscripten_set_main_loop_arg. + * @simulate_infinite_loop If true, this function will throw an * exception in order to stop execution of the caller. This * will lead to the main loop being entered instead of code @@ -134,6 +137,7 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v */ #if EMSCRIPTEN extern void emscripten_set_main_loop(void (*func)(), int fps, int simulate_infinite_loop); +extern void emscripten_set_main_loop_arg(void (*func)(void*), void *arg, int fps, int simulate_infinite_loop); extern void emscripten_pause_main_loop(); extern void emscripten_resume_main_loop(); extern void emscripten_cancel_main_loop(); |