mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-08 14:58:13 +03:00
Emscripten: Introduce xsystem35.shell.onExit()
It notifies the shell of the exit event and allows it to change the exit code.
This commit is contained in:
+1
-2
@@ -147,8 +147,7 @@ int NACT::mainloop()
|
||||
void NACT::quit(int code)
|
||||
{
|
||||
#ifdef __EMSCRIPTEN__
|
||||
if (code >= 0)
|
||||
code = NACT_RESTART; // Restarts the game instead of exiting.
|
||||
code = EM_ASM_INT({ return xsystem35.shell.onExit($0); }, code);
|
||||
#endif
|
||||
exit_code = code;
|
||||
terminate = true;
|
||||
|
||||
Reference in New Issue
Block a user