summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library_browser.js8
-rw-r--r--src/library_glut.js2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 4ef7c577..6056505d 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -954,9 +954,7 @@ mergeInto(LibraryManager.library, {
Browser.mainLoop.method = ''; // just warn once per call to set main loop
}
- if (Module['preMainLoop']) {
- Module['preMainLoop']();
- }
+ if (Module['preMainLoop']) Module['preMainLoop']();
try {
if (typeof arg !== 'undefined') {
@@ -973,9 +971,7 @@ mergeInto(LibraryManager.library, {
}
}
- if (Module['postMainLoop']) {
- Module['postMainLoop']();
- }
+ if (Module['postMainLoop']) Module['postMainLoop']();
if (Browser.mainLoop.shouldPause) {
// catch pauses from the main loop itself
diff --git a/src/library_glut.js b/src/library_glut.js
index 445e08a4..3fe6b6a6 100644
--- a/src/library_glut.js
+++ b/src/library_glut.js
@@ -490,7 +490,9 @@ var LibraryGLUT = {
Browser.requestAnimationFrame(function() {
GLUT.requestedAnimationFrame = false;
if (ABORT) return;
+ if (Module['preMainLoop']) Module['preMainLoop']();
Runtime.dynCall('v', GLUT.displayFunc);
+ if (Module['postMainLoop']) Module['postMainLoop']();
});
}
},