replaced all 'exit's with an ExitEvent exception
The main exits are initiated from code that cannot filter this back to D_DoomMain easily so the exception is the only way to get there. The 3 main points of exit are: * quit/exit CCMD * quitting the menu through ST_Endoom * receiving a quit message on the main window.
This commit is contained in:
parent
5d265d2d88
commit
ff379e7c0c
8 changed files with 17 additions and 9 deletions
|
|
@ -726,7 +726,7 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
|
|||
}
|
||||
else
|
||||
{
|
||||
exit(0);
|
||||
return -1;
|
||||
}
|
||||
havepicked = true;
|
||||
}
|
||||
|
|
@ -793,6 +793,7 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
|
|||
const FIWADInfo *FIWadManager::FindIWAD(TArray<FString> &wadfiles, const char *iwad, const char *basewad, const char *optionalwad)
|
||||
{
|
||||
int iwadType = IdentifyVersion(wadfiles, iwad, basewad, optionalwad);
|
||||
if (iwadType == -1) return nullptr;
|
||||
//gameiwad = iwadType;
|
||||
const FIWADInfo *iwad_info = &mIWadInfos[iwadType];
|
||||
if (DoomStartupInfo.Name.IsEmpty()) DoomStartupInfo.Name = iwad_info->Name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue