Reverse iteration order of ValidateIWADs
Scenario: - Using `-iwad` to explicitly use an IWAD outside of your search paths - You have other, older versions hiding in your search paths - You then change your IWADINFO's BannerColors, cue confusion Because `IdentifyVersion` does search paths then -iwad, and `ValidateIWADs` iterates them in normal order, the file that gets to determine the IWAD startup settings is whatever file is found on the system instead of the file specifically requested.
This commit is contained in:
parent
18300448ee
commit
4b55e7ad14
1 changed files with 9 additions and 1 deletions
|
|
@ -543,8 +543,16 @@ void FIWadManager::ValidateIWADs()
|
|||
{
|
||||
TArray<int> returns;
|
||||
unsigned originalsize = mIWadInfos.Size();
|
||||
for (auto &p : mFoundWads)
|
||||
|
||||
// Iterating normally will give CheckIWADInfo name conflicts priority to
|
||||
// whatever file is found first, rather than the file that the user
|
||||
// specifically requests with -iwad, because IdentifyVersion appends
|
||||
// the -iwad file to the end of the list. (And it's annoying to change
|
||||
// to be the other way around.)
|
||||
for (int i = mFoundWads.SSize() - 1; i >= 0; i--)
|
||||
{
|
||||
auto &p = mFoundWads[i];
|
||||
|
||||
int index;
|
||||
auto x = strrchr(p.mFullPath.GetChars(), '.');
|
||||
if (x != nullptr && (!stricmp(x, ".iwad") || !stricmp(x, ".ipk3") || !stricmp(x, ".ipk7")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue