| 6 | std::string rootDir; |
| 7 | |
| 8 | std::string getRootDirectory() { |
| 9 | // Only fetch the root directory once. |
| 10 | if (rootDir.empty()) |
| 11 | { |
| 12 | // Store the path relative to the current DLL (really AI.exe since we're injected into it). |
| 13 | rootDir = std::filesystem::current_path().string() + "\\mods\\aliasIsolation"; |
| 14 | |
| 15 | // Have we got the root directory? |
| 16 | if (!rootDir.empty()) |
| 17 | { |
| 18 | // We have got the root directory. |
| 19 | LOG_MSG("[aliasIsolation::utilities] Got root directory \"%s\".\n", rootDir.c_str()); |
| 20 | } |
| 21 | else |
| 22 | { |
| 23 | // We failed to get the root directory, break execution here. |
| 24 | LOG_MSG("[aliasIsolation::utilities] FATAL ERROR - Failed to get root directory!\n", ""); |
| 25 | DebugBreak(); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | return rootDir; |
| 30 | } |
| 31 | |
| 32 | std::string getSettingsFilePath() { |
| 33 | WIN32_FIND_DATA findSettingsFileData; |
no outgoing calls
no test coverage detected