PageRenderTime 424ms CodeModel.GetById 200ms app.highlight 7ms RepoModel.GetById 199ms app.codeStats 0ms

/Avc/hooks.js

http://github.com/mbebenita/Broadway
JavaScript | 29 lines | 22 code | 6 blank | 1 comment | 1 complexity | 70edd3371ec6381af0e48e1718b3a258 MD5 | raw file
 1Module['FS'] = FS;
 2FS['createDataFile'] = FS.createDataFile;
 3
 4// Replace main loop handler
 5
 6var breakLoop = false;
 7__Z11runMainLoopv = function() {
 8  window.addEventListener("message", function() {
 9    __Z17mainLoopIterationv();
10    if (!breakLoop) {
11      window.postMessage(0, "*")
12    }
13  }, false);
14}
15
16Module['play'] = function() {
17  breakLoop = false;
18  window.postMessage(0, "*")
19};
20
21Module['stop'] = function() {
22  breakLoop = true;
23};
24
25_SDL_Flip = function(surf) {
26  onFrameDecoded();  
27}
28
29_SDL_UnlockSurface = function() {}