2
0
mirror of https://github.com/Thracky/GlosSI.git synced 2024-11-03 09:40:18 +00:00

Fix controller updaterate

This commit is contained in:
Peter Repukat 2017-01-25 17:14:23 +01:00
parent 84a0849e7d
commit 5a9bf44225
2 changed files with 4 additions and 3 deletions

View File

@ -155,9 +155,10 @@ void VirtualControllerThread::controllerLoop()
}
tickTime = sfClock.getElapsedTime().asMicroseconds();
//std::cout << tickTime << std::endl;
if (tickTime < delay)
std::this_thread::sleep_for(std::chrono::microseconds(delay-tickTime));
{
std::this_thread::sleep_for(std::chrono::microseconds(delay - tickTime));
}
}
}

View File

@ -56,7 +56,7 @@ private:
sf::Clock sfClock;
int tickTime = 0;
int delay = 700;
int delay = 1000000 / 200;
void controllerLoop();