X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fandroid%2Fmouse.cpp;h=3fbc5bebab3affc54b8d478fcdc412f7680dd4ca;hb=ce170ea187abe2b8017cde611d0e2e86a523ee79;hp=b16b6be2331077f48e57ddc2ee4deadde932ea01;hpb=a0584001d28ae224e0065c3c11b09d7965e78963;p=libs%2Fgui.git diff --git a/source/input/android/mouse.cpp b/source/input/android/mouse.cpp index b16b6be..3fbc5be 100644 --- a/source/input/android/mouse.cpp +++ b/source/input/android/mouse.cpp @@ -10,6 +10,10 @@ void Mouse::input_event(const Graphics::Window::Event &event) if(type!=AINPUT_EVENT_TYPE_MOTION) return; + int source = AInputEvent_getSource(event.aevent); + if(window.get_touch_input() && source!=AINPUT_SOURCE_MOUSE && source!=AINPUT_SOURCE_TOUCHPAD) + return; + /* Emulate a mouse with the touch events of a single finger. If more fingers appear while the first one is held down, they are ignored, even if the first finger is released. */