move removal of temporary directories to I_Quit()

Don't leave garbage in the temporary directory on errors.
This commit is contained in:
Roman Fomin 2023-02-11 09:57:03 +07:00
parent afcaf9415c
commit 34892f73b7

View File

@ -32,28 +32,15 @@
// I_Quit // I_Quit
// //
void I_Quit(void)
{
SDL_QuitSubSystem(SDL_INIT_VIDEO);
SDL_Quit();
}
void I_QuitFirst(void)
{
if (demorecording)
{
G_CheckDemoStatus();
}
}
extern char **tempdirs; extern char **tempdirs;
void I_QuitLast(void) void I_Quit(void)
{ {
int i; int i;
M_SaveDefaults(); SDL_QuitSubSystem(SDL_INIT_VIDEO);
SDL_Quit();
if (!tempdirs) if (!tempdirs)
{ {
@ -93,3 +80,16 @@ void I_QuitLast(void)
} }
} }
} }
void I_QuitFirst(void)
{
if (demorecording)
{
G_CheckDemoStatus();
}
}
void I_QuitLast(void)
{
M_SaveDefaults();
}