diff --git a/include/IEventReceiver.h b/include/IEventReceiver.h index f5870fb8..e1c78a62 100644 --- a/include/IEventReceiver.h +++ b/include/IEventReceiver.h @@ -425,6 +425,9 @@ struct SEvent // Y position of simple touch. s32 Y; + // number of current touches + s32 touchedCount; + //! Type of touch event. ETOUCH_INPUT_EVENT Event; }; diff --git a/source/Irrlicht/Android/CIrrDeviceAndroid.cpp b/source/Irrlicht/Android/CIrrDeviceAndroid.cpp index c88ee34d..d35969b3 100644 --- a/source/Irrlicht/Android/CIrrDeviceAndroid.cpp +++ b/source/Irrlicht/Android/CIrrDeviceAndroid.cpp @@ -393,6 +393,7 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent) event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, i); event.TouchInput.X = AMotionEvent_getX(androidEvent, i); event.TouchInput.Y = AMotionEvent_getY(androidEvent, i); + event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent); device->postEventFromUser(event); } @@ -404,6 +405,7 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent) event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, pointerIndex); event.TouchInput.X = AMotionEvent_getX(androidEvent, pointerIndex); event.TouchInput.Y = AMotionEvent_getY(androidEvent, pointerIndex); + event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent); device->postEventFromUser(event); }