2
0

irrlicht-touchcount.patch 1.3 KB

123456789101112131415161718192021222324252627282930
  1. --- irrlicht.orig/include/IEventReceiver.h 2014-06-03 19:43:50.433713133 +0200
  2. +++ irrlicht/include/IEventReceiver.h 2014-06-03 19:44:36.993711489 +0200
  3. @@ -375,6 +375,9 @@
  4. // Y position of simple touch.
  5. s32 Y;
  6. + // number of current touches
  7. + s32 touchedCount;
  8. +
  9. //! Type of touch event.
  10. ETOUCH_INPUT_EVENT Event;
  11. };
  12. --- irrlicht.orig/source/Irrlicht/Android/CIrrDeviceAndroid.cpp 2014-06-03 19:43:50.505713130 +0200
  13. +++ irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp 2014-06-03 19:45:37.265709359 +0200
  14. @@ -315,6 +315,7 @@
  15. event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, i);
  16. event.TouchInput.X = AMotionEvent_getX(androidEvent, i);
  17. event.TouchInput.Y = AMotionEvent_getY(androidEvent, i);
  18. + event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent);
  19. device->postEventFromUser(event);
  20. }
  21. @@ -326,6 +327,7 @@
  22. event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, pointerIndex);
  23. event.TouchInput.X = AMotionEvent_getX(androidEvent, pointerIndex);
  24. event.TouchInput.Y = AMotionEvent_getY(androidEvent, pointerIndex);
  25. + event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent);
  26. device->postEventFromUser(event);
  27. }