MCPcopy Create free account
hub / github.com/ddnet/ddnet / LoadConfigurationFromFile

Method LoadConfigurationFromFile

src/game/client/components/touch_controls.cpp:835–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833}
834
835bool CTouchControls::LoadConfigurationFromFile(int StorageType)
836{
837 void *pFileData;
838 unsigned FileLength;
839 if(!Storage()->ReadFile(CONFIGURATION_FILENAME, StorageType, &pFileData, &FileLength))
840 {
841 log_error("touch_controls", "Failed to read configuration from '%s'", CONFIGURATION_FILENAME);
842 return false;
843 }
844
845 const bool Result = ParseConfiguration(pFileData, FileLength);
846 free(pFileData);
847 return Result;
848}
849
850bool CTouchControls::LoadConfigurationFromClipboard()
851{

Calls 2

StorageFunction · 0.85
ReadFileMethod · 0.80

Tested by

no test coverage detected