diff options
-rw-r--r-- | main/draw.cpp | 4 | ||||
-rw-r--r-- | main/main-impl.hpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/main/draw.cpp b/main/draw.cpp index f039e321..76081f9b 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -87,13 +87,13 @@ void main_impl::draw_world() noexcept void main_impl::do_update() // todo! move to separate file { constexpr auto eps = 1e-5f; - const auto dt = timeline.update(); + auto dt = timeline.update(); if (auto secs = Time::to_seconds(dt); secs > eps) { #if 1 constexpr float RC = 60; constexpr auto alpha = 1 / (1 + RC); - _frame_time = _frame_time * (1 - alpha) + alpha * secs; + _smoothed_frame_time = _smoothed_frame_time * (1 - alpha) + alpha * secs; #else _frame_time = secs; #endif diff --git a/main/main-impl.hpp b/main/main-impl.hpp index 62346893..c056dfa9 100644 --- a/main/main-impl.hpp +++ b/main/main-impl.hpp @@ -104,7 +104,6 @@ struct main_impl final : Platform::Sdl2Application, floormat_main private: Time timeline; - float _frame_time = 0; struct texture_unit_cache _tuc; fm_settings s; |