- Use the game's display name for defaultiwad, not the filename.

* Add-ons don't have a FileName entry, but everything has a display name therefore all bases are covered.
* Fixes #616.
This commit is contained in:
Mitchell Richters 2022-12-11 17:02:36 +11:00
parent 33975a083f
commit c762505b02

View file

@ -774,7 +774,7 @@ static TArray<GrpEntry> SetupGame()
{
for (unsigned i = 0; i < groups.Size(); ++i)
{
FString& basename = groups[i].FileName;
FString& basename = groups[i].FileInfo.name;
if (stricmp(basename, defaultiwad) == 0)
{
pick = i;
@ -807,7 +807,7 @@ static TArray<GrpEntry> SetupGame()
autoloadbrightmaps = !!(flags & 4);
autoloadwidescreen = !!(flags & 8);
// The newly selected IWAD becomes the new default
defaultiwad = groups[pick].FileName;
defaultiwad = groups[pick].FileInfo.name;
}
groupno = pick;
}