mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 13:50:48 +00:00
- copied the restart cleanup code into its own function
This commit is contained in:
parent
282047e67c
commit
42a54ef545
1 changed files with 73 additions and 61 deletions
|
@ -134,6 +134,7 @@ void D_AddWildFile (TArray<FString> &wadfiles, const char *pattern);
|
|||
void D_LoadWadSettings ();
|
||||
void ParseGLDefs();
|
||||
void DrawFullscreenSubtitle(const char *text);
|
||||
void D_Cleanup();
|
||||
|
||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||
|
||||
|
@ -2745,6 +2746,21 @@ void D_DoomMain (void)
|
|||
// Clean up after a restart
|
||||
//
|
||||
|
||||
D_Cleanup();
|
||||
|
||||
gamestate = GS_STARTUP;
|
||||
}
|
||||
while (1);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// clean up the resources
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void D_Cleanup()
|
||||
{
|
||||
// Music and sound should be stopped first
|
||||
S_StopMusic(true);
|
||||
S_StopAllChannels ();
|
||||
|
@ -2806,10 +2822,6 @@ void D_DoomMain (void)
|
|||
restart++;
|
||||
PClass::bShutdown = false;
|
||||
PClass::bVMOperational = false;
|
||||
|
||||
gamestate = GS_STARTUP;
|
||||
}
|
||||
while (1);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue