# HG changeset patch
# User Xeli
# Date 1321115243 -3600
# Node ID 5d9cc2441c48125ad788493fc634eeead2525bed
# Parent  1bde8940e1bb5935796b386f4e8dceab6efe5400
Java side makes use of the official multitouch implementation of SDL

diff -r 1bde8940e1bb -r 5d9cc2441c48 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java	Sat Nov 12 17:14:56 2011 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java	Sat Nov 12 17:27:23 2011 +0100
@@ -121,7 +121,7 @@
 
 	public static native void onNativeKeyUp(int keycode);
 
-	public static native void onNativeTouch(int action, int pointer, float x, float y,
+	public static native void onNativeTouch(int touchDevId, int pointerFingerId, int action, float x, float y,
 			float p);
 
 	public static native void onNativeAccel(float x, float y, float z);
diff -r 1bde8940e1bb -r 5d9cc2441c48 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TouchInterface/TouchInterface.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TouchInterface/TouchInterface.java	Sat Nov 12 17:14:56 2011 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/TouchInterface/TouchInterface.java	Sat Nov 12 17:27:23 2011 +0100
@@ -49,16 +49,11 @@
 	public boolean onTouch(View v, MotionEvent event) {
 		//dumpEvent(event);
 		
-		if(firstEvent){
-			firstEvent = false;
-			SDLActivity.onNativeTouch(-1, -1, v.getWidth(), v.getHeight(), 1);
-		}
-		
 		int action = event.getAction();
 		int actionCode = action & MotionEvent.ACTION_MASK;
 		
 		for (int i = 0; i < event.getPointerCount(); i++) {
-			SDLActivity.onNativeTouch(actionCode, event.getPointerId(i), (int)event.getX(i), (int)event.getY(i), event.getPressure(i));
+			SDLActivity.onNativeTouch(event.getDeviceId(),  event.getPointerId(i), actionCode, (int)event.getX(i), (int)event.getY(i), event.getPressure(i));
 //			Log.d("Android", String.format("x=%f, y=%f, pntr=%d", event.getX(i), event.getY(i), event.getPointerId(i)));
 		   }
 		return true;