[Orxonox-commit 3559] r8245 - code/trunk/src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Sat Apr 16 11:19:06 CEST 2011
Author: landauf
Date: 2011-04-16 11:19:06 +0200 (Sat, 16 Apr 2011)
New Revision: 8245
Modified:
code/trunk/src/libraries/core/Game.cc
Log:
keep it DRY
Modified: code/trunk/src/libraries/core/Game.cc
===================================================================
--- code/trunk/src/libraries/core/Game.cc 2011-04-14 14:53:27 UTC (rev 8244)
+++ code/trunk/src/libraries/core/Game.cc 2011-04-16 09:19:06 UTC (rev 8245)
@@ -208,17 +208,9 @@
this->updateStatistics();
// Limit frame rate
- if(GameMode::showsGraphics())
- {
- static bool hasVSync = GraphicsManager::getInstance().hasVSyncEnabled(); // can be static since changes of VSync currently require a restart
- if (this->fpsLimit_ > 0 && !hasVSync)
- this->updateFPSLimiter();
- }
- else
- {
- if (this->fpsLimit_ > 0)
- this->updateFPSLimiter();
- }
+ static bool hasVSync = GameMode::showsGraphics() && GraphicsManager::getInstance().hasVSyncEnabled(); // can be static since changes of VSync currently require a restart
+ if (this->fpsLimit_ > 0 && !hasVSync)
+ this->updateFPSLimiter();
}
// UNLOAD all remaining states
More information about the Orxonox-commit
mailing list