From 988bf5d0368cb16846c02ea1482ea7b051ab97cb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 26 Feb 2023 21:13:17 +0100 Subject: main: cache window size --- floormat/main.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'floormat') diff --git a/floormat/main.hpp b/floormat/main.hpp index db2eb5c0..b729e9a2 100644 --- a/floormat/main.hpp +++ b/floormat/main.hpp @@ -42,7 +42,7 @@ struct floormat_main virtual int exec() = 0; virtual void quit(int status) = 0; - virtual Magnum::Math::Vector2 window_size() const noexcept = 0; + virtual Magnum::Math::Vector2 window_size() const noexcept; virtual tile_shader& shader() noexcept = 0; virtual const tile_shader& shader() const noexcept = 0; constexpr float smoothed_dt() const noexcept { return _frame_time1; } @@ -74,6 +74,7 @@ struct floormat_main protected: float _frame_time1 = 0, _frame_time2 = 0; Vector2 _dpi_scale{1, 1}, _virtual_scale{1, 1}; + Vector2i _framebuffer_size; }; } // namespace floormat -- cgit v1.2.3