Skip to content

Commit

Permalink
added -noautoload command line option.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Feb 4, 2024
1 parent 4b6646d commit 39b78de
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions source/core/initfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,19 @@ void InitFileSystem(TArray<GrpEntry>& groups)
fileSystem.SetIwadNum(1);
fileSystem.SetMaxIwadNum((int)Files.size() - 1);

D_AddConfigFiles(Files, "Global.Autoload", "*.grp", GameConfig);
if (!Args->CheckParm("-noautoload"))
{
D_AddConfigFiles(Files, "Global.Autoload", "*.grp", GameConfig);

size_t len;
size_t lastpos = 0;
size_t len;
size_t lastpos = 0;

while (lastpos < LumpFilter.Len() && (len = strcspn(LumpFilter.GetChars() + lastpos, ".")) > 0)
{
auto file = LumpFilter.Left(len + lastpos) + ".Autoload";
D_AddConfigFiles(Files, file.GetChars(), "*.grp", GameConfig);
lastpos += len + 1;
while (lastpos < LumpFilter.Len() && (len = strcspn(LumpFilter.GetChars() + lastpos, ".")) > 0)
{
auto file = LumpFilter.Left(len + lastpos) + ".Autoload";
D_AddConfigFiles(Files, file.GetChars(), "*.grp", GameConfig);
lastpos += len + 1;
}
}

if (!insertdirectoriesafter && userConfig.AddFilesPre) for (auto& file : *userConfig.AddFilesPre)
Expand Down

0 comments on commit 39b78de

Please sign in to comment.