diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-02 19:03:32 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-02 20:25:31 +0100 |
| commit | 5a95eb1282e30bd803d7e0b352a8443795842e42 (patch) | |
| tree | c97bc43e4d5107a427817c65aa1b0c2eeb64a427 /main | |
| parent | 0fe5336b9a53f20817f54be0bd7cd935db14914c (diff) | |
fix build with Linux and/or GCC
Diffstat (limited to 'main')
| -rw-r--r-- | main/draw.cpp | 2 | ||||
| -rw-r--r-- | main/setup.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/main/draw.cpp b/main/draw.cpp index 533d09ca..71de7e72 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -147,7 +147,7 @@ void main_impl::drawEvent() constexpr float α = .1f; dt_expected.jitter = std::fmax(dt_expected.jitter + Δt * α, dt_expected.jitter * (1-α) + Δt * α); - dt_expected.jitter = std::copysignf(std::fminf(dt_expected.value, std::fabsf(dt_expected.jitter)), dt_expected.jitter); + dt_expected.jitter = std::copysign(std::fmin(dt_expected.value, std::fabs(dt_expected.jitter)), dt_expected.jitter); } else dt_expected.jitter = 0; diff --git a/main/setup.cpp b/main/setup.cpp index b6488bad..edd95767 100644 --- a/main/setup.cpp +++ b/main/setup.cpp @@ -98,7 +98,7 @@ void main_impl::update_window_state() if (!(flags & SDL_WINDOW_INPUT_FOCUS)) dt_expected.value = 2.f / hz; else - dt_expected.value = std::floorf((1.f/hz - 1e-3f) * 1e3f) * 1e-3f; + dt_expected.value = std::floor((1.f/hz - 1e-3f) * 1e3f) * 1e-3f; } else { |
