From dd4220eaaa75a1e2d75fe67b702f132c3916ecb7 Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Sun, 20 Aug 2023 03:30:06 +0300 Subject: [PATCH] Engine: fixed mouse button state Broken by 3a38e69212378a75064265eb14fb158067f9a069 --- Engine/ac/sys_events.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Engine/ac/sys_events.cpp b/Engine/ac/sys_events.cpp index d7549be3b19..515f4c96283 100644 --- a/Engine/ac/sys_events.cpp +++ b/Engine/ac/sys_events.cpp @@ -448,6 +448,7 @@ static void on_sdl_mouse_down(const SDL_Event &event) sys_mouse_x = event.button.x; sys_mouse_y = event.button.y; + mouse_button_state |= sdl_button_to_mask(event.button.button); g_inputEvtQueue.push_back(event); } @@ -455,6 +456,7 @@ static void on_sdl_mouse_up(const SDL_Event &event) { sys_mouse_x = event.button.x; sys_mouse_y = event.button.y; + mouse_button_state &= ~sdl_button_to_mask(event.button.button); // Uncomment when need to handle mouse up event in the game states //g_inputEvtQueue.push_back(event); }