diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 14:12:31 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 14:12:31 +0200 |
commit | 699e5e7678531884b665e564cf58085a2f867762 (patch) | |
tree | 8fe5ca013550cdcc4e21fa92d7510b44f962fa43 /main/setup.cpp | |
parent | fc631ad2fcc4e4c4105aec97f57b1a8f9a15dc83 (diff) |
try harder to keep vsync framerate
Diffstat (limited to 'main/setup.cpp')
-rw-r--r-- | main/setup.cpp | 2 |
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 { |