project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/TouchInterface/TouchInterface.java
equal
deleted
inserted
replaced
38 |
38 |
39 int action = event.getAction(); |
39 int action = event.getAction(); |
40 int actionCode = action & MotionEvent.ACTION_MASK; |
40 int actionCode = action & MotionEvent.ACTION_MASK; |
41 |
41 |
42 for (int i = 0; i < event.getPointerCount(); i++) { |
42 for (int i = 0; i < event.getPointerCount(); i++) { |
43 SDLActivity.onNativeTouch(actionCode, event.getPointerId(i), event.getX(i), event.getY(i), event.getPressure(i)); |
43 SDLActivity.onNativeTouch(actionCode, event.getPointerId(i), (int)event.getX(i), (int)event.getY(i), event.getPressure(i)); |
|
44 // Log.d("Android", String.format("x=%f, y=%f, pntr=%d", event.getX(i), event.getY(i), event.getPointerId(i))); |
44 } |
45 } |
45 return true; |
46 return true; |
46 } |
47 } |
47 |
48 |
48 /** Show an event in the LogCat view, for debugging */ |
49 /** Show an event in the LogCat view, for debugging */ |