From bc3afc8ed8659c1aea2fa349a7d826f7f01e39ef Mon Sep 17 00:00:00 2001 From: vipsbpig Date: Fri, 15 May 2015 12:40:34 +0800 Subject: fix multitouch release problem --- platform/android/java/src/com/android/godot/Godot.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/android/java/src/com/android/godot/Godot.java b/platform/android/java/src/com/android/godot/Godot.java index e0ac6b0f12..4f42a1a82b 100644 --- a/platform/android/java/src/com/android/godot/Godot.java +++ b/platform/android/java/src/com/android/godot/Godot.java @@ -747,7 +747,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC //} } break; case MotionEvent.ACTION_POINTER_UP: { - int pointer_idx = event.getActionIndex(); + final int indexPointUp = event.getAction() >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; + final int pointer_idx = event.getPointerId(indexPointUp); GodotLib.touch(4,pointer_idx,evcount,arr); //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); } break; -- cgit v1.2.3