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
This commit is contained in:
1 parent
fd063e8ad0
commit
4acd7c2dba
1 file changed
+8
-5
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user