From 47c7734042e3a38cd2cc5006e5134dc9659488ea Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 May 2022 08:35:34 +0200 Subject: [PATCH] - add -compatmode for setting a compatibility mode on startup As a replacement for +compatmode not working as intended. --- src/d_main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/d_main.cpp b/src/d_main.cpp index 86515ce61..43f368552 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -3119,6 +3119,13 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray& allwads, TArr // Base systems have been inited; enable cvar callbacks 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"); S_Init ();