--- 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);
--- 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;