summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/cocoa_v.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index 7c8981f61..31bad36dc 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -675,20 +675,20 @@ void VideoDriver_Cocoa::GameLoop()
if (cur_ticks >= next_game_tick || (_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 {
- 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. */
- 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;
}
::GameLoop();
}
if (cur_ticks >= next_draw_tick) {
- next_draw_tick += std::chrono::milliseconds(MILLISECONDS_PER_TICK);
+ next_draw_tick += this->GetDrawInterval();
/* Avoid next_draw_tick getting behind more and more if it cannot keep up. */
- if (next_draw_tick < cur_ticks - std::chrono::microseconds(ALLOWED_DRIFT * MILLISECONDS_PER_TICK)) next_draw_tick = cur_ticks;
+ if (next_draw_tick < cur_ticks - ALLOWED_DRIFT * this->GetDrawInterval()) next_draw_tick = cur_ticks;
bool old_ctrl_pressed = _ctrl_pressed;