From: cloudwalk Date: Tue, 29 Sep 2020 00:33:13 +0000 (+0000) Subject: host: Make Host_Quit_f static. Avoid calling it directly. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=337c93beda229bafc22d45b87d65eeff967b8464;p=xonotic%2Fdarkplaces.git host: Make Host_Quit_f static. Avoid calling it directly. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12957 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_demo.c b/cl_demo.c index 7c787432..186174e9 100644 --- a/cl_demo.c +++ b/cl_demo.c @@ -98,7 +98,7 @@ void CL_StopPlayback (void) if (!cls.demostarting) // only quit if not starting another demo if (Sys_CheckParm("-demo") || Sys_CheckParm("-capturedemo")) - Host_Quit_f(&cmd_client); + host.state = host_shutdown; } @@ -579,11 +579,11 @@ static void CL_FinishTimeDemo (void) } Z_Free(history); history = NULL; - Host_Quit_f(&cmd_client); + host.state = host_shutdown; } } else - Host_Quit_f(&cmd_client); + host.state = host_shutdown; } } diff --git a/host.c b/host.c index 4b192c52..b71eefa8 100644 --- a/host.c +++ b/host.c @@ -205,7 +205,7 @@ static void Host_ServerOptions (void) Host_Quit_f ================== */ -void Host_Quit_f(cmd_state_t *cmd) +static void Host_Quit_f(cmd_state_t *cmd) { if(host.state == host_shutdown) Con_Printf("shutting down already!\n"); diff --git a/menu.c b/menu.c index 1a550298..8dd76934 100644 --- a/menu.c +++ b/menu.c @@ -3287,7 +3287,7 @@ static void M_Quit_Key(cmd_state_t *cmd, int key, int ascii) case 'Y': case 'y': - Host_Quit_f(cmd); + host.state = host_shutdown; break; default: diff --git a/quakedef.h b/quakedef.h index 4acbd64b..dfe40570 100644 --- a/quakedef.h +++ b/quakedef.h @@ -567,7 +567,6 @@ double Host_Frame(double time); void Host_Shutdown(void); void Host_StartVideo(void); void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; -void Host_Quit_f(cmd_state_t *cmd); void Host_NoOperation_f(cmd_state_t *cmd); void Host_LockSession(void); void Host_UnlockSession(void);