- added a portable config file option, for now only on Windows: If the engine finds a file named [GAMENAME]_portable.ini, it will use that instead of creating a user specific version, so that portable installs can carry their INI along.

This commit is contained in:
Christoph Oelckers 2016-04-27 13:04:37 +02:00
parent 934b1923d0
commit ebca8cc5b0

View file

@ -198,6 +198,13 @@ FString M_GetConfigPath(bool for_reading)
FString path; FString path;
HRESULT hr; HRESULT hr;
path.Format("%s" GAMENAME "_portable.ini", progdir.GetChars());
if (FileExists(path))
{
return path;
}
path = "";
// Construct a user-specific config name // Construct a user-specific config name
if (UseKnownFolders() && GetKnownFolder(CSIDL_APPDATA, FOLDERID_RoamingAppData, true, path)) if (UseKnownFolders() && GetKnownFolder(CSIDL_APPDATA, FOLDERID_RoamingAppData, true, path))
{ {