]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Add DP_FS_USERDIR macro consistent to DP_FS_BASEDIR.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Jul 2016 13:13:10 +0000 (13:13 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 18 Aug 2016 15:42:40 +0000 (17:42 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12265 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=07f459ff32baea233afcd025447039f33dab235f

fs.c

diff --git a/fs.c b/fs.c
index 6c00d3c53b8de94173192c2db4b6aba7c885a80b..1dfc97f1857234c2816099576dd3fda480af33cc 100644 (file)
--- 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