diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-01 23:23:30 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-02 05:09:57 +0100 |
commit | 05f3e721694249a71f46cef3c87e0156b00363ee (patch) | |
tree | 729a060a0a2ff47b011434f1dd18b6d3a23dff1b | |
parent | 14188d4c05bb2724bb79ac7b6e3b549b686dbdd3 (diff) |
c
-rw-r--r-- | editor/tests/pathfinding.cpp | 6 | ||||
-rw-r--r-- | main/main-impl.hpp | 1 | ||||
-rw-r--r-- | main/setup.cpp | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/editor/tests/pathfinding.cpp b/editor/tests/pathfinding.cpp index 8dfe1589..303277c6 100644 --- a/editor/tests/pathfinding.cpp +++ b/editor/tests/pathfinding.cpp @@ -97,20 +97,24 @@ step_s pf_test::get_next_step(point from, point to) bool pf_test::handle_key(app& a, const key_event& e, bool is_down) { + (void) a; (void)e; (void)is_down; return false; } bool pf_test::handle_mouse_click(app& a, const mouse_button_event& e, bool is_down) { + (void)a; (void)e; (void)is_down; return false; } void pf_test::draw_overlay(app& a) { + (void)a; } -void pf_test::draw_ui(app& a, float menu_bar_height) +void pf_test::draw_ui(app& a, float) { + (void)a; } void pf_test::update_pre(app& a) diff --git a/main/main-impl.hpp b/main/main-impl.hpp index f87bd5fc..39e07d4c 100644 --- a/main/main-impl.hpp +++ b/main/main-impl.hpp @@ -59,6 +59,7 @@ struct main_impl final : Platform::Sdl2Application, floormat_main class world& reset_world(class world&& w) noexcept override; SDL_Window* window() noexcept override; void update_window_state(); + static unsigned get_window_refresh_rate(SDL_Window* window, unsigned min, unsigned max); float smoothed_frame_time() const noexcept override; fm_settings& settings() noexcept override; diff --git a/main/setup.cpp b/main/setup.cpp index b61e411b..93d28436 100644 --- a/main/setup.cpp +++ b/main/setup.cpp @@ -103,7 +103,7 @@ auto main_impl::make_gl_conf(const fm_settings&) -> GLConfiguration .setStencilBufferSize(0); } -unsigned get_window_refresh_rate(SDL_Window* window, unsigned min, unsigned max) +unsigned main_impl::get_window_refresh_rate(SDL_Window* window, unsigned min, unsigned max) { fm_assert(window != nullptr); if (int index = SDL_GetWindowDisplayIndex(window); index < 0) @@ -122,7 +122,6 @@ unsigned get_window_refresh_rate(SDL_Window* window, unsigned min, unsigned max) void main_impl::update_window_state() // todo window minimized, out of focus, fake vsync etc { - constexpr auto b = [](bool x) { return x ? "1" : "0"; }; const auto flags = (SDL_WindowFlags)SDL_GetWindowFlags(window()); int interval = std::abs(SDL_GL_GetSwapInterval()); @@ -146,6 +145,7 @@ void main_impl::update_window_state() // todo window minimized, out of focus, fa }; #if 0 + constexpr auto b = [](bool x) { return x ? "1" : "0"; }; DBG_nospace << "window:" << " " << _framebuffer_size.x() << "x" << _framebuffer_size.y() << " hz:" << hz << " vsync:" << b(vsync) |