From 3cb4e86b480000bdfab1f75c46e2c63b1c0452f5 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 00250bf4f..8cb67c9d6 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1851,17 +1851,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 @@ -1888,7 +1891,7 @@ FUNCNORETURN void ATTRNORETURN I_Quit(void) } if (myargmalloc) free(myargv); // Deallocate allocated memory -death: + W_Shutdown(); exit(0); }