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:
parent
84a0849e7d
commit
5a9bf44225
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ private:
|
||||
|
||||
sf::Clock sfClock;
|
||||
int tickTime = 0;
|
||||
int delay = 700;
|
||||
int delay = 1000000 / 200;
|
||||
|
||||
void controllerLoop();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user