| 56 | static bool shutdown_complete = false; |
| 57 | |
| 58 | void exit_callback() { |
| 59 | if (!shutdown_complete) { |
| 60 | return; // Still waiting. |
| 61 | } |
| 62 | if (main_started) { |
| 63 | Main::cleanup(); |
| 64 | main_started = false; |
| 65 | } |
| 66 | int exit_code = OS_Web::get_singleton()->get_exit_code(); |
| 67 | memdelete(os); |
| 68 | os = nullptr; |
| 69 | emscripten_force_exit(exit_code); // Exit runtime. |
| 70 | } |
| 71 | |
| 72 | void cleanup_after_sync() { |
| 73 | shutdown_complete = true; |
nothing calls this directly
no test coverage detected