From 4acd7c2dba4e4c61300f80fdf66b16fdb479c54f Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 7 Dec 2025 19:51:29 +0100 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 copy pasted from what the dedicated build does --- src/sdl/i_system.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index a5e8fe2d9..a1d6c673f 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1857,17 +1857,20 @@ INT32 I_StartupSystem(void) return 0; } +boolean is_quitting = false; + // // I_Quit // FUNCNORETURN void ATTRNORETURN I_Quit(void) { - static SDL_bool quiting = SDL_FALSE; - /* prevent recursive I_Quit() */ - if (quiting) goto death; + if (is_quitting) + abort(); + + is_quitting = true; SDL_ShowCursor(SDL_TRUE); - quiting = SDL_FALSE; + I_ShutdownConsole(); M_SaveConfig(NULL); //save game config, cvars.. D_SaveBan(); // save the ban list @@ -1894,7 +1897,7 @@ FUNCNORETURN void ATTRNORETURN I_Quit(void) } if (myargmalloc) free(myargv); // Deallocate allocated memory -death: + W_Shutdown(); exit(0); }