]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
vid_sdl: Set host.state = host_shutdown to exit by breaking the main loop
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 17:35:02 +0000 (17:35 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 17:35:02 +0000 (17:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12853 d7cf8633-e32d-0410-b094-e92efae38249

vid_sdl.c

index b2c007bc4179ea1c179abb93d399a56e4db4e366..7c13bb9b51f7a702b4af7312f72ca323f24900d4 100644 (file)
--- 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;
                                        }
                                }