From: cloudwalk Date: Mon, 20 Jul 2020 17:35:02 +0000 (+0000) Subject: vid_sdl: Set host.state = host_shutdown to exit by breaking the main loop X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eb95b586f29e00324642fe35ed40ada5fed6d71b;p=xonotic%2Fdarkplaces.git vid_sdl: Set host.state = host_shutdown to exit by breaking the main loop git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12853 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_sdl.c b/vid_sdl.c index b2c007bc..7c13bb9b 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -1076,7 +1076,7 @@ void Sys_SendKeyEvents( void ) #ifdef DEBUGSDLEVENTS Con_DPrintf("SDL_Event: SDL_QUIT\n"); #endif - Sys_Quit(0); + host.state = host_shutdown; break; case SDL_KEYDOWN: case SDL_KEYUP: @@ -1202,7 +1202,7 @@ void Sys_SendKeyEvents( void ) vid_hasfocus = false; break; case SDL_WINDOWEVENT_CLOSE: - Sys_Quit(0); + host.state = host_shutdown; break; } }