summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-23 22:38:54 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-23 22:38:54 +0200
commit0efe01d0e7286e9eb60c4739ae748c0cb6e7a51f (patch)
tree09121d7fcbb17151ea10331bfb3de0474fe6a661 /main
parentb6a067678ab9e225647b256595d54dde2ce6f2f5 (diff)
a
Diffstat (limited to 'main')
-rw-r--r--main/floormat-events.cpp4
-rw-r--r--main/floormat-events.hpp3
-rw-r--r--main/main.hpp1
3 files changed, 4 insertions, 4 deletions
diff --git a/main/floormat-events.cpp b/main/floormat-events.cpp
index 5e8aa278..d0ed797b 100644
--- a/main/floormat-events.cpp
+++ b/main/floormat-events.cpp
@@ -64,7 +64,7 @@ void main_impl::keyPressEvent(Platform::Sdl2Application::KeyEvent& event)
{
if (app.on_key_down({(SDL_Keycode)(std::uint32_t)event.key(),
(SDL_Keymod)(std::uint16_t)event.modifiers(),
- event.isRepeated()}))
+ true, event.isRepeated()}))
return event.setAccepted();
}
@@ -72,7 +72,7 @@ void main_impl::keyReleaseEvent(Platform::Sdl2Application::KeyEvent& event)
{
if (app.on_key_up({(SDL_Keycode)(std::uint32_t)event.key(),
(SDL_Keymod)(std::uint16_t)event.modifiers(),
- event.isRepeated()}))
+ false, event.isRepeated()}))
return event.setAccepted();
}
diff --git a/main/floormat-events.hpp b/main/floormat-events.hpp
index 4d9376df..64f41efd 100644
--- a/main/floormat-events.hpp
+++ b/main/floormat-events.hpp
@@ -46,7 +46,8 @@ struct text_editing_event final {
struct key_event final {
SDL_Keycode key = SDLK_UNKNOWN;
SDL_Keymod mods = KMOD_NONE;
- bool is_repeated = false;
+ std::uint8_t is_down : 1 = false;
+ std::uint8_t is_repeated : 1 = false;
};
struct any_event final {
diff --git a/main/main.hpp b/main/main.hpp
index 98552a7c..e11c15f7 100644
--- a/main/main.hpp
+++ b/main/main.hpp
@@ -128,7 +128,6 @@ private:
std::optional<Vector2i> _cursor_pixel;
std::optional<global_coords> _cursor_tile;
float _frame_time = 0;
- bool _cursor_in_imgui = false;
struct app_settings {
bool vsync = true;