diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-03-24 15:04:41 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-03-24 15:04:41 -0700 |
commit | 6ad919104f7c00ae3774be7d275d9a259869dbc9 (patch) | |
tree | f6025334ba38604c3bd82fe359c46c930dd1fd6d /system | |
parent | 63af5eac0a10434cc62244d80675f13473d38b02 (diff) |
SDL mouse support and emscripten_set_main_loop
Diffstat (limited to 'system')
-rw-r--r-- | system/include/emscripten.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/system/include/emscripten.h b/system/include/emscripten.h index 7b135c5a..ea078e8c 100644 --- a/system/include/emscripten.h +++ b/system/include/emscripten.h @@ -19,6 +19,15 @@ extern void emscripten_run_script(const char *script); extern int emscripten_run_script_int(const char *script); /* + * Set a C function as the main event loop. The JS environment + * will call that function at a specified number of frames per + * second. Setting 0 as the fps will use the default browser + * frame rate. + */ +extern void emscripten_set_main_loop(void (*func)(), int fps); +extern void emscripten_cancel_main_loop(); + +/* * This macro-looking function will cause Emscripten to * generate a comment in the generated code. * XXX This is deprecated for now, because it requires us to |