- second part of last commit. This file was accidentally unselected.

This commit is contained in:
Christoph Oelckers 2016-03-08 14:35:36 +01:00
parent 1815b076ee
commit 9d877f75e3

View file

@ -381,13 +381,15 @@ int FIWadManager::CheckIWAD (const char *doomwaddir, WadStuff *wads)
//
//==========================================================================
static bool havepicked = false;
int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad, const char *zdoom_wad)
{
TArray<WadStuff> wads;
TArray<size_t> foundwads;
const char *iwadparm = Args->CheckValue ("-iwad");
size_t numwads;
int pickwad;
size_t numwads;
size_t i;
bool iwadparmfound = false;
FString custwad;
@ -544,6 +546,8 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
}
}
}
if (!havepicked) // just use the first IWAD if the restart doesn't have a -iwad parameter. We cannot open the picker in fullscreen mode.
{
pickwad = I_PickIWad(&wads[0], (int)numwads, queryiwad, defiwad);
if (pickwad >= 0)
{
@ -551,10 +555,11 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
FString basename = ExtractFileBase(wads[pickwad].Path);
defaultiwad = basename;
}
}
if (pickwad < 0)
exit(0);
havepicked = true;
}
}
// zdoom.pk3 must always be the first file loaded and the IWAD second.
wadfiles.Clear();