| 44 | } |
| 45 | |
| 46 | void EngineSuspendIfNeeded() { |
| 47 | #ifdef USE_MAIN_LOOP_CALLBACK |
| 48 | // Here we have to something hacky: emscripten requires us to not take over the main |
| 49 | // loop. So we use this exception to suspend the VM right inside the gl_frame() call. |
| 50 | // FIXME: do this at the start of the frame instead? |
| 51 | THROW_OR_ABORT(string("SUSPEND-VM-MAINLOOP")); |
| 52 | #endif |
| 53 | } |
| 54 | |
| 55 | void EngineExit(int code) { |
| 56 | GraphicsShutDown(); |