project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java
changeset 7334 66a10ae88457
parent 7326 1fae07363938
child 7449 2e63537b44f3
equal deleted inserted replaced
7332:3f2e130f9715 7334:66a10ae88457
   578 	}
   578 	}
   579 
   579 
   580 	// Touch events
   580 	// Touch events
   581 	public boolean onTouch(View v, MotionEvent event) {
   581 	public boolean onTouch(View v, MotionEvent event) {
   582 		final int action = event.getAction() & MotionEvent.ACTION_MASK;
   582 		final int action = event.getAction() & MotionEvent.ACTION_MASK;
   583 		final int actionPointerIndex = event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK;		
   583 		final int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;		
   584 
   584 
   585 		if (action == MotionEvent.ACTION_MOVE) {
   585 		if (action == MotionEvent.ACTION_MOVE) {
   586 			// TODO send motion to every pointer if its position has
   586 			// TODO send motion to every pointer if its position has
   587 			// changed since prev event.
   587 			// changed since prev event.
   588 			for (int i = 0; i < event.getPointerCount(); i++) {
   588 			for (int i = 0; i < event.getPointerCount(); i++) {