MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / setProgramPath

Function setProgramPath

TheForceEngine/TFE_FileSystem/paths.cpp:155–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

mainFunction · 0.50

Calls 5

c_strMethod · 0.80
getCurrentDirectoryFunction · 0.70
existsFunction · 0.70
getExecutionDirectoryFunction · 0.70
setCurrentDirectoryFunction · 0.70

Tested by

no test coverage detected