mirror of https://github.com/OpenRCT2/OpenRCT2.git
Replace spinlock in main game loop
This commit is contained in:
parent
82b18ddaf3
commit
2392e2658a
|
@ -458,13 +458,12 @@ static void openrct2_loop()
|
|||
currentTick = SDL_GetTicks();
|
||||
ticksElapsed = currentTick - lastTick;
|
||||
if (ticksElapsed < 25) {
|
||||
if (ticksElapsed < 15)
|
||||
SDL_Delay(15 - ticksElapsed);
|
||||
continue;
|
||||
SDL_Delay(25 - ticksElapsed);
|
||||
lastTick += 25;
|
||||
} else {
|
||||
lastTick = currentTick;
|
||||
}
|
||||
|
||||
lastTick = currentTick;
|
||||
|
||||
platform_process_messages();
|
||||
|
||||
rct2_update();
|
||||
|
|
Loading…
Reference in New Issue