[Orxonox-commit 1600] r6318 - code/branches/presentation2/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Dec 10 23:40:07 CET 2009
Author: rgrieder
Date: 2009-12-10 23:40:07 +0100 (Thu, 10 Dec 2009)
New Revision: 6318
Modified:
code/branches/presentation2/src/libraries/core/Game.cc
Log:
This should fix the fps limiter if you play longer than 2^32 nanoseconds.
Modified: code/branches/presentation2/src/libraries/core/Game.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Game.cc 2009-12-10 21:38:36 UTC (rev 6317)
+++ code/branches/presentation2/src/libraries/core/Game.cc 2009-12-10 22:40:07 UTC (rev 6318)
@@ -313,7 +313,7 @@
void Game::updateFPSLimiter()
{
- uint32_t nextTime = gameClock_->getMicroseconds() - excessSleepTime_ + static_cast<uint32_t>(1000000.0f / fpsLimit_);
+ uint64_t nextTime = gameClock_->getMicroseconds() - excessSleepTime_ + static_cast<uint32_t>(1000000.0f / fpsLimit_);
uint64_t currentRealTime = gameClock_->getRealMicroseconds();
while (currentRealTime < nextTime - minimumSleepTime_)
{
More information about the Orxonox-commit
mailing list