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

Function readFromDisk

TheForceEngine/TFE_Settings/settings.cpp:290–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288 }
289
290 bool readFromDisk()
291 {
292 FileStream settings;
293 if (settings.open(s_settingsPath, Stream::MODE_READ))
294 {
295 const size_t len = settings.getSize();
296 s_iniBuffer.resize(len + 1);
297 s_iniBuffer[len] = 0;
298 settings.readBuffer(s_iniBuffer.data(), (u32)len);
299 settings.close();
300
301 parseIniFile(s_iniBuffer.data(), len);
302 autodetectGamePaths();
303
304 return true;
305 }
306 return false;
307 }
308
309 bool writeToDisk(bool writeDefaultSettings)
310 {

Callers 1

initFunction · 0.85

Calls 8

parseIniFileFunction · 0.85
autodetectGamePathsFunction · 0.85
dataMethod · 0.80
openMethod · 0.45
getSizeMethod · 0.45
resizeMethod · 0.45
readBufferMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected