| 153 | } |
| 154 | |
| 155 | bool setProgramPath() |
| 156 | { |
| 157 | char path[TFE_MAX_PATH]; |
| 158 | FileUtil::getCurrentDirectory(path); |
| 159 | // This is here for ease of use in Visual Studio. |
| 160 | // Check to see if the current directory is valid. |
| 161 | char testPath[TFE_MAX_PATH]; |
| 162 | sprintf(testPath, "%s/%s", path, "SDL2.dll"); |
| 163 | if (!FileUtil::exists(testPath)) |
| 164 | { |
| 165 | FileUtil::getExecutionDirectory(path); |
| 166 | } |
| 167 | |
| 168 | s_paths[PATH_PROGRAM] = path; |
| 169 | s_paths[PATH_PROGRAM] += "\\"; |
| 170 | FileUtil::setCurrentDirectory(s_paths[PATH_PROGRAM].c_str()); |
| 171 | return true; |
| 172 | } |
| 173 | |
| 174 | bool mapSystemPath(char* path) |
| 175 | { |
no test coverage detected