From: cloudwalk Date: Fri, 19 Jun 2020 12:25:50 +0000 (+0000) Subject: In Host_Main, loop until host.state == host_shutdown instead of infinitely. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c1cd237f55d5276c1b0bafdb225122c36331dba1;p=xonotic%2Fdarkplaces.git In Host_Main, loop until host.state == host_shutdown instead of infinitely. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12695 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 1bcd62b5..8c825f48 100644 --- a/host.c +++ b/host.c @@ -668,7 +668,8 @@ void Host_Main(void) host.realtime = 0; host.dirtytime = Sys_DirtyTime(); - for (;;) + + while(host.state != host_shutdown) { if (setjmp(host.abortframe)) { @@ -1066,6 +1067,8 @@ void Host_Main(void) host.framecount++; } + + Sys_Quit(0); } //============================================================================ diff --git a/host_cmd.c b/host_cmd.c index ef7f664d..07750479 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -58,7 +58,7 @@ void Host_Quit_f(cmd_state_t *cmd) if(host.state == host_shutdown) Con_Printf("shutting down already!\n"); else - Sys_Quit (0); + host.state = host_shutdown; } /*