Skip to content

Commit

Permalink
android: fix touch/stylus taps triggering mouse1 for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
rdb committed Feb 17, 2018
1 parent 6bd1976 commit 8dea93b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions panda/src/androiddisplay/androidGraphicsWindow.cxx
Expand Up @@ -545,6 +545,9 @@ handle_motion_event(const AInputEvent *event) {
// The up event doesn't let us know which button is up, so we need to
// keep track of the button state ourselves.
int32_t button_state = AMotionEvent_getButtonState(event);
if (button_state == 0 && action == AMOTION_EVENT_ACTION_DOWN) {
button_state = AMOTION_EVENT_BUTTON_PRIMARY;
}
int32_t changed = _mouse_button_state ^ button_state;
if (changed != 0) {
if (changed & AMOTION_EVENT_BUTTON_PRIMARY) {
Expand Down

0 comments on commit 8dea93b

Please sign in to comment.