mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-20 02:45:37 +01:00
Fix fa170b9
: [SDL2] forgot to use GetGameInterval where needed
This commit is contained in:
parent
15a0ac2735
commit
932abe6d5c
@ -778,11 +778,11 @@ void VideoDriver_SDL::LoopOnce()
|
|||||||
|
|
||||||
if (cur_ticks >= next_game_tick || (_fast_forward && !_pause_mode)) {
|
if (cur_ticks >= next_game_tick || (_fast_forward && !_pause_mode)) {
|
||||||
if (_fast_forward && !_pause_mode) {
|
if (_fast_forward && !_pause_mode) {
|
||||||
next_game_tick = cur_ticks + std::chrono::milliseconds(MILLISECONDS_PER_TICK);
|
next_game_tick = cur_ticks + this->GetGameInterval();
|
||||||
} else {
|
} else {
|
||||||
next_game_tick += std::chrono::milliseconds(MILLISECONDS_PER_TICK);
|
next_game_tick += this->GetGameInterval();
|
||||||
/* Avoid next_game_tick getting behind more and more if it cannot keep up. */
|
/* Avoid next_game_tick getting behind more and more if it cannot keep up. */
|
||||||
if (next_game_tick < cur_ticks - std::chrono::milliseconds(ALLOWED_DRIFT * MILLISECONDS_PER_TICK)) next_game_tick = cur_ticks;
|
if (next_game_tick < cur_ticks - ALLOWED_DRIFT * this->GetGameInterval()) next_game_tick = cur_ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The gameloop is the part that can run asynchronously. The rest
|
/* The gameloop is the part that can run asynchronously. The rest
|
||||||
|
Loading…
Reference in New Issue
Block a user