summaryrefslogtreecommitdiffhomepage
path: root/main/floormat-events.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-24 14:04:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-24 14:04:51 +0200
commitbb17be56d2cd22949bf485c518d543a7e79a6b7d (patch)
tree2076f82df9a2e9a612dc4678bbdda1adf0d1064e /main/floormat-events.cpp
parenta4c24b236e7438adb34798fcd20178e3b69b5215 (diff)
a
Diffstat (limited to 'main/floormat-events.cpp')
-rw-r--r--main/floormat-events.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/floormat-events.cpp b/main/floormat-events.cpp
index 3200728a..adc1c575 100644
--- a/main/floormat-events.cpp
+++ b/main/floormat-events.cpp
@@ -18,7 +18,7 @@ void main_impl::mousePressEvent(Platform::Sdl2Application::MouseEvent& event)
{
app.on_mouse_up_down({event.position(),
(SDL_Keymod)(std::uint16_t)event.modifiers(),
- mouse_button(event.button()),
+ mouse_button(SDL_BUTTON((std::uint8_t)event.button())),
std::uint8_t(std::min(255, event.clickCount()))},
true);
}
@@ -27,7 +27,7 @@ void main_impl::mouseReleaseEvent(Platform::Sdl2Application::MouseEvent& event)
{
app.on_mouse_up_down({event.position(),
(SDL_Keymod)(std::uint16_t)event.modifiers(),
- mouse_button(event.button()),
+ mouse_button(SDL_BUTTON((std::uint8_t)event.button())),
std::uint8_t(std::min(255, event.clickCount()))},
false);
}