Skip to content

Commit

Permalink
Engine: fixed mouse button state
Browse files Browse the repository at this point in the history
Broken by 3a38e69
  • Loading branch information
ivan-mogilko committed Aug 20, 2023
1 parent 31abfbd commit dd4220e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Engine/ac/sys_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,15 @@ 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);
}

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);
}
Expand Down

0 comments on commit dd4220e

Please sign in to comment.