diff --git a/src/common/engine/startupinfo.h b/src/common/engine/startupinfo.h index 5054a4507..f47fa351f 100644 --- a/src/common/engine/startupinfo.h +++ b/src/common/engine/startupinfo.h @@ -12,6 +12,7 @@ struct FStartupInfo int Type; int LoadLights = -1; int LoadBrightmaps = -1; + int LoadWidescreen = -1; int modern = 0; enum { diff --git a/src/d_main.cpp b/src/d_main.cpp index 7b6cde6b2..cd84fc746 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1937,6 +1937,11 @@ static FString ParseGameInfo(TArray &pwads, const char *fn, const char sc.MustGetNumber(); GameStartupInfo.LoadBrightmaps = !!sc.Number; } + else if (!nextKey.CompareNoCase("LOADWIDESCREEN")) + { + sc.MustGetNumber(); + GameStartupInfo.LoadWidescreen = !!sc.Number; + } else { // Silently ignore unknown properties @@ -2071,7 +2076,7 @@ static void AddAutoloadFiles(const char *autoname) if (bmwad) D_AddFile (allwads, bmwad, true, -1, GameConfig); } - if (autoloadwidescreen) + if (GameStartupInfo.LoadWidescreen == 1 || (GameStartupInfo.LoadWidescreen != 0 && autoloadwidescreen)) { const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL, false, GameConfig); if (wswad) @@ -3730,7 +3735,7 @@ void D_Cleanup() // delete GameStartupInfo data GameStartupInfo.Name = ""; GameStartupInfo.BkColor = GameStartupInfo.FgColor = GameStartupInfo.Type = 0; - GameStartupInfo.LoadLights = GameStartupInfo.LoadBrightmaps = -1; + GameStartupInfo.LoadWidescreen = GameStartupInfo.LoadLights = GameStartupInfo.LoadBrightmaps = -1; GC::FullGC(); // clean up before taking down the object list.