From d77044bfaabb5ee3d8ff0d2a9464fe3a1eab07fb Mon Sep 17 00:00:00 2001 From: pelya Date: Mon, 16 May 2011 11:58:54 +0300 Subject: [PATCH] Fix to Java part of multitouch input --- project/java/Video.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/project/java/Video.java b/project/java/Video.java index cd482cfbf..438442873 100644 --- a/project/java/Video.java +++ b/project/java/Video.java @@ -137,7 +137,7 @@ abstract class DifferentTouchInput touchEvents[id].y = (int)event.getY(i); touchEvents[id].pressure = (int)(event.getPressure(i) * 1000.0); touchEvents[id].size = (int)(event.getSize(i) * 1000.0); - DemoGLSurfaceView.nativeMouse( touchEvents[i].x, touchEvents[i].y, action, id, touchEvents[i].pressure, touchEvents[i].size ); + DemoGLSurfaceView.nativeMouse( touchEvents[id].x, touchEvents[id].y, action, id, touchEvents[id].pressure, touchEvents[id].size ); } } @@ -163,19 +163,16 @@ abstract class DifferentTouchInput } else { - int id = event.getPointerId(ii); - if( id >= touchEventMax ) - id = touchEventMax-1; - if( touchEvents[id].down ) + if( touchEvents[i].down ) action = 2; else action = 0; - touchEvents[id].down = true; - touchEvents[id].x = (int)event.getX(i); - touchEvents[id].y = (int)event.getY(i); - touchEvents[id].pressure = (int)(event.getPressure(i) * 1000.0); - touchEvents[id].size = (int)(event.getSize(i) * 1000.0); - DemoGLSurfaceView.nativeMouse( touchEvents[i].x, touchEvents[i].y, action, id, touchEvents[i].pressure, touchEvents[i].size ); + touchEvents[i].down = true; + touchEvents[i].x = (int)event.getX(ii); + touchEvents[i].y = (int)event.getY(ii); + touchEvents[i].pressure = (int)(event.getPressure(ii) * 1000.0); + touchEvents[i].size = (int)(event.getSize(ii) * 1000.0); + DemoGLSurfaceView.nativeMouse( touchEvents[i].x, touchEvents[i].y, action, i, touchEvents[i].pressure, touchEvents[i].size ); } } }