MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / GetPrefDir

Function GetPrefDir

engine/source/platformEmscripten/EmscriptenFileio.cpp:157–183  ·  view source on GitHub ↗

get the "pref dir", which is where game output files are stored. the pref dir is ~/PREF_DIR_ROOT/PREF_DIR_GAME_NAME

Source from the content-addressed store, hash-verified

155// get the "pref dir", which is where game output files are stored. the pref
156// dir is ~/PREF_DIR_ROOT/PREF_DIR_GAME_NAME
157static const char* GetPrefDir()
158{
159#ifdef DUMMY_PLATFORM
160 getcwd(sgPrefDir, MaxPath);
161 return sgPrefDir;
162#else
163 return "/.data/";/*
164 if (sgPrefDirInitialized)
165 return sgPrefDir;
166
167 if (gPlatState.useRedirect)
168 {
169 const char *home = getenv("HOME");
170 AssertFatal(home, "HOME environment variable must be set");
171
172 dSprintf(sgPrefDir, MaxPath, "%s/%s/%s",
173 home, PREF_DIR_ROOT, PREF_DIR_GAME_NAME);
174 }
175 else
176 {
177 getcwd(sgPrefDir, MaxPath);
178 }
179
180 sgPrefDirInitialized = true;
181 return sgPrefDir;*/
182#endif
183}
184
185//------------------------------------------------------------------------------
186// munge the case of the specified pathName. This means try to find the actual

Callers 5

ModifyFileFunction · 0.70
openMethod · 0.70
getFileTimesMethod · 0.70
createPathMethod · 0.70
dumpPathMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected