From 8c8e475c36c9fc80d7efe05eda3cb4c1f5a1ebdf Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 7 Dec 2025 23:49:40 -0500 Subject: [PATCH] i_system: "fix" recursive i_quit well this still aint working all to great, but atleast this allows me to quit the game if it gets stuck without having to always send a kill signal to it --- src/sdl/i_system.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 342125e28..c8a6c68f1 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1952,17 +1952,19 @@ INT32 I_StartupSystem(void) return 0; } +boolean is_quitting = false; + // // I_Quit // void I_Quit(void) { - static SDL_bool quiting = SDL_FALSE; - /* prevent recursive I_Quit() */ - if (quiting) goto death; + if (is_quitting) + abort(); + + is_quitting = true; SDLforceUngrabMouse(); - quiting = SDL_FALSE; M_SaveConfig(NULL); //save game config, cvars.. D_SaveBan(); // save the ban list @@ -1997,7 +1999,7 @@ void I_Quit(void) } if (myargmalloc) free(myargv); // Deallocate allocated memory -death: + W_Shutdown(); exit(0); }