From ce8b15c9c16de6a8ecd571d1d56e6da2d27dfca1 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 20 Jul 2016 13:13:10 +0000 Subject: [PATCH] Add DP_FS_USERDIR macro consistent to DP_FS_BASEDIR. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12265 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=07f459ff32baea233afcd025447039f33dab235f --- fs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs.c b/fs.c index 6c00d3c5..1dfc97f1 100644 --- a/fs.c +++ b/fs.c @@ -2085,15 +2085,18 @@ void FS_Init (void) *fs_userdir = 0; // user wants roaming installation, no userdir else { +#ifdef DP_FS_USERDIR + strlcpy(fs_userdir, DP_FS_USERDIR, sizeof(fs_userdir)); +#else int dirmode; int highestuserdirmode = USERDIRMODE_COUNT - 1; int preferreduserdirmode = USERDIRMODE_COUNT - 1; int userdirstatus[USERDIRMODE_COUNT]; -#ifdef WIN32 +# ifdef WIN32 // historical behavior... if (!strcmp(gamedirname1, "id1")) preferreduserdirmode = USERDIRMODE_NOHOME; -#endif +# endif // check what limitations the user wants to impose if (COM_CheckParm("-home")) preferreduserdirmode = USERDIRMODE_HOME; if (COM_CheckParm("-mygames")) preferreduserdirmode = USERDIRMODE_MYGAMES; @@ -2125,6 +2128,7 @@ void FS_Init (void) // and finally, we picked one... FS_ChooseUserDir((userdirmode_t)dirmode, fs_userdir, sizeof(fs_userdir)); Con_DPrintf("userdir %i is the winner\n", dirmode); +#endif } // if userdir equal to basedir, clear it to avoid confusion later -- 2.39.2