Skip to content

Commit

Permalink
Fix for Android double tap not triggering correctly #46100 and #46101.
Browse files Browse the repository at this point in the history
Changes the buttonMask for doubleTap input on android to recognize both Mouse and Screen Touch inputs.
  • Loading branch information
Ongnissim committed Oct 26, 2021
1 parent 46a139a commit 726ff9f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public boolean onDoubleTap(MotionEvent event) {
//Log.i("GodotGesture", "onDoubleTap");
final int x = Math.round(event.getX());
final int y = Math.round(event.getY());
final int buttonMask = event.getButtonState();
final int buttonMask = event.getButtonState() + (event.getToolType(event.getActionIndex()) != MotionEvent.TOOL_TYPE_MOUSE ? 1 : 0) * event.getPointerCount();
GodotLib.doubleTap(buttonMask, x, y);
return true;
}
Expand Down

0 comments on commit 726ff9f

Please sign in to comment.