aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-13 19:43:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-13 19:43:52 -0700
commitea8c61d4aa5c437bb096371a0e211a37bded69b6 (patch)
treebab70ce66ee7f7dd94491f69ca32652340743dfc /src/library_sdl.js
parent955d27814497fbe9f628b208d202d9a61dfc3a74 (diff)
trigger postMainLoop in SDL_GL_SwapBuffers (=finishing rendering a frame)
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index a01b3c6c..694bd0bc 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -2850,7 +2850,12 @@ var LibrarySDL = {
return _emscripten_GetProcAddress(name_);
},
- SDL_GL_SwapBuffers: function() {},
+ SDL_GL_SwapBuffers: function() {
+#if PROXY_TO_WORKER
+ // postMainLoop is where the proxy code listens, to know when to proxy buffered render commands
+ if (Module['postMainLoop']) Module['postMainLoop']();
+#endif
+ },
// SDL 2