-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenmw.patch
19 lines (18 loc) · 972 Bytes
/
openmw.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp
index 07127d28b..73618813e 100644
--- a/apps/openmw/engine.cpp
+++ b/apps/openmw/engine.cpp
@@ -515,10 +515,13 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
controllerFileName = "gamecontrollerdb.txt";
}
+ const std::string userdefault = mCfgMgr.getUserConfigPath().string() + "/" + controllerFileName;
const std::string localdefault = mCfgMgr.getLocalPath().string() + "/" + controllerFileName;
const std::string globaldefault = mCfgMgr.getGlobalPath().string() + "/" + controllerFileName;
std::string gameControllerdb;
- if (boost::filesystem::exists(localdefault))
+ if (boost::filesystem::exists(userdefault))
+ gameControllerdb = userdefault;
+ else if (boost::filesystem::exists(localdefault))
gameControllerdb = localdefault;
else if (boost::filesystem::exists(globaldefault))
gameControllerdb = globaldefault;