void UCarlaSettings::LoadSettings() { CurrentFileName = TEXT(""); // Load settings from project Config folder if present. LoadSettingsFromFile(FPaths::Combine(FPaths::GameConfigDir(), TEXT("CarlaSettings.ini")), false); // Load settings given by command-line arg if provided. { FString FilePath; if (GetSettingsFilePathFromCommandLine(FilePath)) { LoadSettingsFromFile(FilePath, true); } } // Override settings from command-line. { uint32 Value; if (FParse::Value(FCommandLine::Get(), TEXT("-world-port="), Value) || FParse::Value(FCommandLine::Get(), TEXT("-carla-world-port="), Value)) { WorldPort = Value; bUseNetworking = true; } if (FParse::Param(FCommandLine::Get(), TEXT("carla-no-networking"))) { bUseNetworking = false; } } }
SettingsOutput::SettingsOutput(int subBasinID, string fileName, mongoc_client_t *conn, string dbName, mongoc_gridfs_t *gfs) : m_conn(conn), m_dbName(dbName), m_outputGfs(gfs) { SetSubbasinIDs(); LoadSettingsFromFile(subBasinID, fileName); }
void SetRegKey(int argc,wchar_t* argv[]) { CString Branch; int i; for (i=1;i<argc;i++) { if (argv[i][0]==L'-' || argv[i][0]==L'/') { switch (argv[i][1]) { case L'X': if (argv[i][2]==L'\0') { if (i<argc-1) Branch=argv[++i]; } else Branch=(argv[i]+2); break; } } } g_szRegKey=ReadIniFile(&g_szRegFile,Branch.GetPData(),g_bFileIsReg); if (g_szRegKey!=NULL) { if (g_szRegFile!=NULL) LoadSettingsFromFile(g_szRegKey,g_szRegFile,g_bFileIsReg); } else { // Use default g_szRegKey=alloccopy("Software\\Update"); } }
status_t openCamera(void) { LoadSettingsFromFile(); stickReader = new MSAC_SR1(serialportsetting, speed); return(stickReader->init()); }