aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-07-20 16:16:16 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-07-20 16:16:16 -0700
commitf2273cc4c24954dd28638a710e144913f1b91d90 (patch)
treedc860b8b5790b8a5b2900776cd58d386a51c3b6d /system
parenta4d8b7c20f255fa4218a641ea50cbfd327b055b8 (diff)
better main loop blockers progress reporting
Diffstat (limited to 'system')
-rw-r--r--system/include/emscripten/emscripten.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index 9bc6c410..2e26bc6d 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -61,6 +61,14 @@ inline void emscripten_push_main_loop_blocker(void (*func)()) {
#endif
/*
+ * Sets the number of blockers remaining until some user-relevant
+ * event. This affects how we show progress. So if you set this
+ * to 10, then push 10 blockers, as they complete the user will
+ * see x/10 and so forth.
+ */
+extern void emscripten_set_main_loop_blockers_num(void (*func)());
+
+/*
* Call a C function asynchronously, that is, after returning
* control to the JS event loop. This is done by a setTimeout.
* When building natively this becomes a simple direct call,