Changeset 8079 for code/trunk/src/libraries/core/Game.cc
- Timestamp:
- Mar 15, 2011, 9:47:11 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/Game.cc
r7284 r8079 50 50 #include "GameMode.h" 51 51 #include "GameState.h" 52 #include "GraphicsManager.h" 52 53 #include "GUIManager.h" 53 54 #include "command/ConsoleCommand.h" … … 60 61 static void printFPS() 61 62 { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; } 62 SetConsoleCommand(" printFPS", &printFPS);63 SetConsoleCommand("Stats", "printFPS", &printFPS); 63 64 static void printTickTime() 64 65 { COUT(0) << Game::getInstance().getAvgTickTime() << std::endl; } 65 SetConsoleCommand(" printTickTime", &printTickTime);66 SetConsoleCommand("Stats", "printTickTime", &printTickTime); 66 67 67 68 std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s; … … 142 143 SetConfigValue(statisticsAvgLength_, 1000000) 143 144 .description("Sets the time in microseconds interval at which average fps, etc. gets calculated."); 144 SetConfigValue(fpsLimit_, 50) 145 146 SetConfigValueExternal(fpsLimit_, "GraphicsSettings", "fpsLimit", 50) 145 147 .description("Sets the desired frame rate (0 for no limit)."); 146 148 } … … 207 209 208 210 // Limit frame rate 209 this->updateFPSLimiter(); 211 static bool hasVSync = GraphicsManager::getInstance().hasVSyncEnabled(); // can be static since changes of VSync currently require a restart 212 if (this->fpsLimit_ > 0 && !hasVSync) 213 this->updateFPSLimiter(); 210 214 } 211 215
Note: See TracChangeset
for help on using the changeset viewer.