summaryrefslogtreecommitdiffhomepage
path: root/main/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-09 11:55:05 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-09 11:55:05 +0100
commitf4a9ab08a06c751ca1464859b441d11bc5debc93 (patch)
tree09f6480790e4dc6150a8b9607960f571976b7559 /main/draw.cpp
parent4245f1d43ff0370fb5ea53649da740bbf06b62c9 (diff)
uh maybe try these weights
Diffstat (limited to 'main/draw.cpp')
-rw-r--r--main/draw.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index d9e3195c..ca2e00a1 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -114,14 +114,13 @@ void main_impl::drawEvent()
float dt = timeline.previousFrameDuration();
if (dt > 0)
{
- const float RC1 = dt_expected.do_sleep ? 1.f : 1.f/4,
- RC2 = 1.f/8;
+ const float RC1 = dt_expected.do_sleep ? 1.f : 1.f/5, RC2 = 1.f/10;
const float alpha1 = dt/(dt + RC1);
const float alpha2 = dt/(dt + RC2);
_frame_time1 = _frame_time1*(1-alpha1) + alpha1*dt;
_frame_time2 = _frame_time1*(1-alpha2) + alpha2*dt;
- constexpr float max_deviation = 10 * 1e-3f;
+ constexpr float max_deviation = 5 * 1e-3f;
if (std::fabs(_frame_time1 - _frame_time2) > max_deviation)
_frame_time1 = _frame_time2;
}