diff --git a/src/sys/nact.cpp b/src/sys/nact.cpp index 2cb27b8..114226f 100644 --- a/src/sys/nact.cpp +++ b/src/sys/nact.cpp @@ -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; }