From 39b78dede1519dec016ddbe9fd0f4deabbf703dd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Feb 2024 14:57:25 +0100 Subject: [PATCH] added -noautoload command line option. --- source/core/initfs.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/source/core/initfs.cpp b/source/core/initfs.cpp index e79ac7a0a1..78b9c98c7e 100644 --- a/source/core/initfs.cpp +++ b/source/core/initfs.cpp @@ -376,16 +376,19 @@ void InitFileSystem(TArray& 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)