From ebca8cc5b0613a8a6a002ef12b137b6f3a3b30a4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 27 Apr 2016 13:04:37 +0200 Subject: [PATCH] - 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. --- src/m_specialpaths.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/m_specialpaths.cpp b/src/m_specialpaths.cpp index 60ccf08a8..abfb5db8f 100644 --- a/src/m_specialpaths.cpp +++ b/src/m_specialpaths.cpp @@ -198,6 +198,13 @@ FString M_GetConfigPath(bool for_reading) FString path; HRESULT hr; + path.Format("%s" GAMENAME "_portable.ini", progdir.GetChars()); + if (FileExists(path)) + { + return path; + } + path = ""; + // Construct a user-specific config name if (UseKnownFolders() && GetKnownFolder(CSIDL_APPDATA, FOLDERID_RoamingAppData, true, path)) {