mirror of
https://github.com/yawut/SDL.git
synced 2026-07-30 23:17:23 -05:00
Make Android port compatible with older API versions again.
Fixes Bugzilla #1563. Thanks to Philipp Wiesemann for the patch!
This commit is contained in:
parent
d6ce4be3b6
commit
d20ba4537e
|
|
@ -539,9 +539,9 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
final int touchDevId = event.getDeviceId();
|
||||
final int pointerCount = event.getPointerCount();
|
||||
// touchId, pointerId, action, x, y, pressure
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent. ACTION_POINTER_ID_SHIFT; /* API 8: event.getActionIndex(); */
|
||||
int pointerFingerId = event.getPointerId(actionPointerIndex);
|
||||
int action = event.getActionMasked();
|
||||
int action = (event.getAction() & MotionEvent.ACTION_MASK); /* API 8: event.getActionMasked(); */
|
||||
|
||||
float x = event.getX(actionPointerIndex);
|
||||
float y = event.getY(actionPointerIndex);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user