From: divverent Date: Wed, 20 Jul 2016 13:13:10 +0000 (+0000) Subject: Add DP_FS_USERDIR macro consistent to DP_FS_BASEDIR. X-Git-Tag: xonotic-v0.8.5~88^2~57 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=07f459ff32baea233afcd025447039f33dab235f;p=xonotic%2Fdarkplaces.git 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 --- 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