From c762505b02ee6b446c38f01df9f4ce7686629ede Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 11 Dec 2022 17:02:36 +1100 Subject: [PATCH] - 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. --- source/core/gamecontrol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 93676b815..84753d9d4 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -774,7 +774,7 @@ static TArray 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 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; }