mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-18 05:33:52 +01:00
Android: import touchedCount patch
This commit is contained in:
parent
10a188e967
commit
dfe077134d
@ -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;
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user