aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 8e86371e..357bd96b 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -44,7 +44,12 @@ mergeInto(LibraryManager.library, {
},
runIter: function(func) {
if (ABORT) return;
- if (Module['preMainLoop']) Module['preMainLoop']();
+ if (Module['preMainLoop']) {
+ var preRet = Module['preMainLoop']();
+ if (preRet === false) {
+ return; // |return false| skips a frame
+ }
+ }
try {
func();
} catch (e) {