Emscripten: Restart game instead of exiting

The same behavior as xsystem35.
This commit is contained in:
kichikuou
2023-09-27 16:48:16 +09:00
parent 30ca8b714b
commit 759a5eab5d
+4
View File
@@ -146,6 +146,10 @@ int NACT::mainloop()
void NACT::quit(int code)
{
#ifdef __EMSCRIPTEN__
if (code >= 0)
code = NACT_RESTART; // Restarts the game instead of exiting.
#endif
exit_code = code;
terminate = true;
}