- Import GAMENAMELOWERCASE macro from Zandronum.
This will greatly help reducing the code delta between ZDoom and the child ports.
This commit is contained in:
parent
e07f64a23a
commit
a88f515364
4 changed files with 20 additions and 18 deletions
|
|
@ -204,7 +204,7 @@ FString M_GetConfigPath(bool for_reading)
|
|||
{
|
||||
path += "/" GAME_DIR;
|
||||
CreatePath(path);
|
||||
path += "/zdoom.ini";
|
||||
path += "/" GAMENAMELOWERCASE ".ini";
|
||||
}
|
||||
else
|
||||
{ // construct "$PROGDIR/zdoom-$USER.ini"
|
||||
|
|
@ -224,11 +224,11 @@ FString M_GetConfigPath(bool for_reading)
|
|||
*probe = '_';
|
||||
++probe;
|
||||
}
|
||||
path << "zdoom-" << uname << ".ini";
|
||||
path << GAMENAMELOWERCASE "-" << uname << ".ini";
|
||||
}
|
||||
else
|
||||
{ // Couldn't get user name, so just use zdoom.ini
|
||||
path += "zdoom.ini";
|
||||
path += GAMENAMELOWERCASE ".ini";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ FString M_GetConfigPath(bool for_reading)
|
|||
if (!FileExists(path))
|
||||
{
|
||||
path = progdir;
|
||||
path << "zdoom.ini";
|
||||
path << GAMENAMELOWERCASE ".ini";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -411,11 +411,11 @@ FString M_GetConfigPath(bool for_reading)
|
|||
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
||||
{
|
||||
FString path;
|
||||
path << cpath << "/zdoom.ini";
|
||||
path << cpath << "/" GAMENAMELOWERCASE ".ini";
|
||||
return path;
|
||||
}
|
||||
// Ungh.
|
||||
return "zdoom.ini";
|
||||
return GAMENAMELOWERCASE ".ini";
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -497,12 +497,12 @@ FString GetUserFile (const char *file)
|
|||
// This can be removed after a release or two
|
||||
// Transfer the old zdoom directory to the new location
|
||||
bool moved = false;
|
||||
FString oldpath = NicePath("~/.zdoom/");
|
||||
FString oldpath = NicePath("~/." GAMENAMELOWERCASE "/");
|
||||
if (stat (oldpath, &extrainfo) != -1)
|
||||
{
|
||||
if (rename(oldpath, path) == -1)
|
||||
{
|
||||
I_Error ("Failed to move old zdoom directory (%s) to new location (%s).",
|
||||
I_Error ("Failed to move old " GAMENAMELOWERCASE " directory (%s) to new location (%s).",
|
||||
oldpath.GetChars(), path.GetChars());
|
||||
}
|
||||
else
|
||||
|
|
@ -598,7 +598,7 @@ FString M_GetCajunPath(const char *botfilename)
|
|||
|
||||
FString M_GetConfigPath(bool for_reading)
|
||||
{
|
||||
return GetUserFile("zdoom.ini");
|
||||
return GetUserFile(GAMENAMELOWERCASE ".ini");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue