| 194 | } |
| 195 | |
| 196 | std::string Manager::getUserEnginePath() |
| 197 | { |
| 198 | #if defined(POSIX) |
| 199 | |
| 200 | // First check for a local copy of the game tree, e.g. ~/.doom3 |
| 201 | std::string localGamePrefix = currentGame()->getKeyValue("prefix"); |
| 202 | if (!localGamePrefix.empty()) |
| 203 | { |
| 204 | std::string homeDir = getenv("HOME"); |
| 205 | fs::path localPath = fs::path(homeDir) / localGamePrefix; |
| 206 | |
| 207 | if (fs::exists(localPath)) |
| 208 | { |
| 209 | return os::standardPathWithSlash(localPath); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | #endif |
| 214 | |
| 215 | // Otherwise (Windows, or no local mod path found) return the regular engine path |
| 216 | return _config.enginePath; |
| 217 | } |
| 218 | |
| 219 | const GameConfiguration& Manager::getConfig() const |
| 220 | { |
no test coverage detected