]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
vid_sdl: Set host.state = host_shutdown to exit by breaking the main loop
[xonotic/darkplaces.git] / 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;
                                        }
                                }