summaryrefslogtreecommitdiffhomepage
path: root/main/setup.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-26 14:12:31 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-26 14:12:31 +0200
commit699e5e7678531884b665e564cf58085a2f867762 (patch)
tree8fe5ca013550cdcc4e21fa92d7510b44f962fa43 /main/setup.cpp
parentfc631ad2fcc4e4c4105aec97f57b1a8f9a15dc83 (diff)
try harder to keep vsync framerate
Diffstat (limited to 'main/setup.cpp')
-rw-r--r--main/setup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/setup.cpp b/main/setup.cpp
index 36e2b78a..48ee7832 100644
--- a/main/setup.cpp
+++ b/main/setup.cpp
@@ -104,7 +104,7 @@ void main_impl::update_window_state()
if (!(flags & SDL_WINDOW_INPUT_FOCUS))
dt_expected.value = 2.f / hz;
else
- dt_expected.value = 0.95f / hz;
+ dt_expected.value = std::floorf((1.f/hz - 1e-3f) * 1e3f) * 1e-3f;
}
else
{