From bcad040fd341e78f1f32c83d0ad8b0143dd4aa51 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 3 May 2024 09:45:20 -0400 Subject: [PATCH] - always show iwad picker, offer option for forks to hide picker by default. this commit was intentionally done in a way to cause merge conflicts so as to force fork maintainers to pay attention to the new option in version.h --- src/common/engine/i_interface.cpp | 3 ++- src/d_iwad.cpp | 4 ++-- src/version.h | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/engine/i_interface.cpp b/src/common/engine/i_interface.cpp index 580dde407c..7030194ea6 100644 --- a/src/common/engine/i_interface.cpp +++ b/src/common/engine/i_interface.cpp @@ -4,6 +4,7 @@ #include "startupinfo.h" #include "c_cvars.h" #include "gstrings.h" +#include "version.h" static_assert(sizeof(void*) == 8, "32 builds are not supported"); @@ -23,7 +24,7 @@ bool pauseext; FStartupInfo GameStartupInfo; -CVAR(Bool, queryiwad, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); +CVAR(Bool, queryiwad, QUERYIWADDEFAULT, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); CVAR(String, defaultiwad, "", CVAR_ARCHIVE | CVAR_GLOBALCONFIG); CVAR(Bool, vid_fps, false, 0) diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index f1495febcd..99f5df02f6 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -728,7 +728,7 @@ int FIWadManager::IdentifyVersion (std::vector&wadfiles, const char int pick = 0; // We got more than one so present the IWAD selection box. - if (picks.Size() > 1) + if (picks.Size() > 0) { // Locate the user's prefered IWAD, if it was found. if (defaultiwad[0] != '\0') @@ -743,7 +743,7 @@ int FIWadManager::IdentifyVersion (std::vector&wadfiles, const char } } } - if (picks.Size() > 1) + if (picks.Size() > 0) { if (!havepicked) { diff --git a/src/version.h b/src/version.h index 1d02a1f406..21d2247e60 100644 --- a/src/version.h +++ b/src/version.h @@ -101,8 +101,11 @@ const char *GetVersionString(); #define GAMENAME "GZDoom" #define WGAMENAME L"GZDoom" #define GAMENAMELOWERCASE "gzdoom" +#define QUERYIWADDEFAULT true #define FORUM_URL "http://forum.zdoom.org/" #define BUGS_FORUM_URL "http://forum.zdoom.org/viewforum.php?f=2" +// For QUERYIWADDEFAULT: Set to 'true' to always show dialog box on startup by default, 'false' to disable. +// Should set to 'false' for standalone games, and set to 'true' for regular source port forks that are meant to run any game. #if defined(__APPLE__) || defined(_WIN32) #define GAME_DIR GAMENAME