X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Finput%2Fandroid%2Ftouchscreen.cpp;h=f4703c340b8d5cca4fc9164a16a57d0474b01726;hb=74dbff4e7e7cd427ac50820cc6366ea421d4d049;hp=bfbf7aaa8181c78aa73373fddf56de71b989f374;hpb=b45ba2f7ceb60c1a6abc1a951a97b40c03671264;p=libs%2Fgui.git diff --git a/source/input/android/touchscreen.cpp b/source/input/android/touchscreen.cpp index bfbf7aa..f4703c3 100644 --- a/source/input/android/touchscreen.cpp +++ b/source/input/android/touchscreen.cpp @@ -1,10 +1,36 @@ +#include #include "touchscreen.h" namespace Msp { namespace Input { -void Touchscreen::input_event(const Graphics::Window::Event &) +void Touchscreen::input_event(const Graphics::Window::Event &event) { + int action = AMotionEvent_getAction(event.aevent); + int action_pointer = (action&AMOTION_EVENT_ACTION_POINTER_INDEX_MASK)>>AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; + action &= AMOTION_EVENT_ACTION_MASK; + + int pointer_count = AMotionEvent_getPointerCount(event.aevent); + for(int i=0; i