From: Lock l00p Date: Mon, 3 Jun 2024 22:02:34 +0000 (+0000) Subject: Create foldername define to allow changing where switch gamedata is stored X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FLockl00p%2Fswitch-support;p=xonotic%2Fdarkplaces.git Create foldername define to allow changing where switch gamedata is stored --- diff --git a/fs.c b/fs.c index bbab3b57..81fc6588 100644 --- a/fs.c +++ b/fs.c @@ -25,6 +25,10 @@ #include #include +#ifndef FOLDERNAME +#define FOLERNAME "darkplaces" +#endif + #ifdef WIN32 # include # include @@ -2207,7 +2211,7 @@ static void FS_Init_Dir (void) accountGetProfile(&profile, userID); accountProfileGet(&profile,NULL,&profileBase); - dpsnprintf(fs_basedir, sizeof(fs_basedir), "/switch/darkplaces/%s",profileBase.nickname); + dpsnprintf(fs_basedir, sizeof(fs_basedir), "/switch/%s/%s",FOLDERNAME,profileBase.nickname); //No idea why I need to make this weird struct to use stat but stackoverflow decreed I must, so I shall. struct stat sb; if(stat(fs_basedir,&sb) == -1){