Replace spinlock in main game loop

This commit is contained in:
LRFLEW 2016-10-18 16:13:10 -05:00 committed by Ted John
parent 82b18ddaf3
commit 2392e2658a
1 changed files with 4 additions and 5 deletions

View File

@ -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();