summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-26 19:21:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-26 19:21:58 +0200
commiteb5097b993286ffe44214ad493db75e1749c8ec9 (patch)
tree73dde601e79c8897960ef56a8706be229c301204 /main
parent61c1ed471755f0d66c0e03fbc3b0edad83b40b34 (diff)
try to make fps counter less bogus
Diffstat (limited to 'main')
-rw-r--r--main/draw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index 96c37811..fdd07c41 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -99,13 +99,13 @@ void main_impl::drawEvent()
if (dt > 0)
{
const float RC1 = dt_expected.do_sleep ? 1.f : 1.f/15,
- RC2 = dt_expected.do_sleep ? 1.f/15 : 1.f/60;
+ RC2 = dt_expected.do_sleep ? 1.f/10 : 1.f/30;
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 = 5 * 1e-3f;
+ constexpr float max_deviation = 10 * 1e-3f;
if (std::fabs(_frame_time1 - _frame_time2) > max_deviation)
_frame_time1 = _frame_time2;
}