[Orxonox-commit 3529] r8215 - code/trunk/src/libraries/core
dafrick at orxonox.net
dafrick at orxonox.net
Sat Apr 9 19:07:18 CEST 2011
Author: dafrick
Date: 2011-04-09 19:07:17 +0200 (Sat, 09 Apr 2011)
New Revision: 8215
Modified:
code/trunk/src/libraries/core/Game.cc
Log:
Bugfix, so that orxonox will start in modes that don't show any graphics, e.g. dedicated or masterserver mode.
Modified: code/trunk/src/libraries/core/Game.cc
===================================================================
--- code/trunk/src/libraries/core/Game.cc 2011-04-09 16:48:15 UTC (rev 8214)
+++ code/trunk/src/libraries/core/Game.cc 2011-04-09 17:07:17 UTC (rev 8215)
@@ -208,9 +208,17 @@
this->updateStatistics();
// Limit frame rate
- static bool hasVSync = GraphicsManager::getInstance().hasVSyncEnabled(); // can be static since changes of VSync currently require a restart
- if (this->fpsLimit_ > 0 && !hasVSync)
- this->updateFPSLimiter();
+ 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();
+ }
}
// UNLOAD all remaining states
More information about the Orxonox-commit
mailing list