- add -compatmode for setting a compatibility mode on startup

As a replacement for +compatmode not working as intended.
This commit is contained in:
Christoph Oelckers 2022-05-06 08:35:34 +02:00
parent 3fb292ac71
commit 47c7734042

View file

@ -3120,6 +3120,13 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
// Base systems have been inited; enable cvar callbacks // Base systems have been inited; enable cvar callbacks
FBaseCVar::EnableCallbacks (); FBaseCVar::EnableCallbacks ();
// +compatmode cannot be used on the command line, so use this as a substitute
auto compatmodeval = Args->CheckValue("-compatmode");
if (compatmodeval)
{
compatmode = (int)strtoll(compatmodeval, nullptr, 10);
}
if (!batchrun) Printf ("S_Init: Setting up sound.\n"); if (!batchrun) Printf ("S_Init: Setting up sound.\n");
S_Init (); S_Init ();