diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-17 14:49:45 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-02-19 10:43:15 +0100 |
commit | 5bfa0145057f2b67ed05d491abea82df4cc10d6b (patch) | |
tree | 21c9cf95878fae10f244834fc054e11f6784f94f /src/video/sdl2_v.h | |
parent | 25f6851ca184346297c1d953e9e649311a0dc083 (diff) | |
download | openttd-5bfa0145057f2b67ed05d491abea82df4cc10d6b.tar.xz |
Codechange: track _realtime_tick more accurate
_realtime_tick was reset every time the diff was calculated. This
means if it would trigger, say, every N.9 milliseconds, it would
after two iterations already drift a millisecond. This adds up
pretty quick.
Diffstat (limited to 'src/video/sdl2_v.h')
-rw-r--r-- | src/video/sdl2_v.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/sdl2_v.h b/src/video/sdl2_v.h index 61d607d56..6b5d3dd14 100644 --- a/src/video/sdl2_v.h +++ b/src/video/sdl2_v.h @@ -63,7 +63,7 @@ private: bool edit_box_focused; std::chrono::steady_clock::time_point cur_ticks; - std::chrono::steady_clock::time_point last_cur_ticks; + std::chrono::steady_clock::time_point last_realtime_tick; std::chrono::steady_clock::time_point next_tick; int startup_display; |