Changeset 3255 for code/branches/core4/src/core/Core.cc
- Timestamp:
- Jun 29, 2009, 11:59:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/Core.cc
r3253 r3255 80 80 Core* Core::singletonRef_s = 0; 81 81 82 SetCommandLineArgument(mediaPath, "").information("PATH"); 83 SetCommandLineOnlyArgument(writingPathSuffix, "").information("DIR"); 84 SetCommandLineArgument(settingsFile, "orxonox.ini"); 85 SetCommandLineArgument(limitToCPU, 0).information("0: off | #cpu"); 82 SetCommandLineArgument(mediaPath, "").information("Path to the media/data files"); 83 SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files"); 84 SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file"); 85 #ifdef ORXONOX_PLATFORM_WINDOWS 86 SetCommandLineArgument(limitToCPU, 0).information("Limits the program to one cpu/core (1, 2, 3, etc.). 0 turns it off (default)"); 87 #endif 86 88 87 89 /** … … 263 265 CommandLine::parseFile(); 264 266 267 #ifdef ORXONOX_PLATFORM_WINDOWS 265 268 // limit the main thread to the first core so that QueryPerformanceCounter doesn't jump 266 269 // do this after ogre has initialised. Somehow Ogre changes the settings again (not through … … 269 272 if (limitToCPU > 0) 270 273 setThreadAffinity(static_cast<unsigned int>(limitToCPU)); 274 #endif 271 275 272 276 // Manage ini files and set the default settings file (usually orxonox.ini) … … 423 427 void Core::setThreadAffinity(int limitToCPU) 424 428 { 429 #ifdef ORXONOX_PLATFORM_WINDOWS 430 425 431 if (limitToCPU <= 0) 426 432 return; 427 433 428 #ifdef ORXONOX_PLATFORM_WINDOWS429 434 unsigned int coreNr = limitToCPU - 1; 430 435 // Get the current process core mask
Note: See TracChangeset
for help on using the changeset viewer.