Changeset 7424 for sandbox_qt/src/libraries/core/Core.cc
- Timestamp:
- Sep 12, 2010, 2:48:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox_qt/src/libraries/core/Core.cc
r7421 r7424 53 53 #include "util/Exception.h" 54 54 #include "PathConfig.h" 55 #include "CommandLineParser.h" 55 56 56 57 namespace orxonox … … 59 60 Core* Core::singletonPtr_s = 0; 60 61 62 SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file"); 63 64 #ifdef ORXONOX_PLATFORM_WINDOWS 65 SetCommandLineArgument(limitToCPU, 1).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is the first core (faster than off)"); 66 #endif 67 61 68 Core::Core(const std::string& cmdLine) 62 69 { 63 70 // Set the hard coded fixed paths 64 71 this->pathConfig_.reset(new PathConfig()); 72 73 // Parse command line arguments 74 CommandLineParser::parseCommandLine(cmdLine); 65 75 66 76 // Set configurable paths like log, config and media … … 70 80 OutputHandler::getInstance().setLogPath(PathConfig::getLogPathString()); 71 81 82 // Parse additional options file now that we know its path 83 CommandLineParser::parseFile(); 84 72 85 #ifdef ORXONOX_PLATFORM_WINDOWS 73 86 // limit the main thread to the first core so that QueryPerformanceCounter doesn't jump 74 int limitToCPU = 0;//CommandLineParser::getValue("limitToCPU");87 int limitToCPU = CommandLineParser::getValue("limitToCPU").toInt(); 75 88 if (limitToCPU > 0) 76 89 setThreadAffinity(static_cast<unsigned int>(limitToCPU)); … … 78 91 79 92 // Generate documentation instead of normal run? 80 std::string docFilename; 81 //CommandLineParser::getValue("generateDoc", &docFilename); 93 std::string docFilename = CommandLineParser::getValue("generateDoc").toString().toStdString(); 82 94 if (!docFilename.empty()) 83 95 { … … 85 97 if (docFile.is_open()) 86 98 { 87 //CommandLineParser::generateDoc(docFile);99 CommandLineParser::generateDoc(docFile); 88 100 docFile.close(); 89 101 }
Note: See TracChangeset
for help on using the changeset viewer.