]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
In Host_Main, loop until host.state == host_shutdown instead of infinitely.
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 19 Jun 2020 12:25:50 +0000 (12:25 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 19 Jun 2020 12:25:50 +0000 (12:25 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12695 d7cf8633-e32d-0410-b094-e92efae38249

host.c
host_cmd.c

diff --git a/host.c b/host.c
index 1bcd62b52bc5f41ff0f534dbf04e29d9d43eeff4..8c825f4848b14bbac09831a94c040a97e3f962e2 100644 (file)
--- 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);
 }
 
 //============================================================================
index ef7f664d4acbd8ae1454af9212cc4ea5b7e9c87a..07750479ab580eb633c29a78652fd60e96c55ae4 100644 (file)
@@ -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;
 }
 
 /*