[Android] Verifiy motionEvent is from a joystick
Geoffrey Métais
git at videolan.org
Fri Dec 19 13:36:47 CET 2014
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 17 12:17:02 2014 +0100| [9a0fac4581dc46fcdb1750f7690dab8d21e4f6a1] | committer: Jean-Baptiste Kempf
Verifiy motionEvent is from a joystick
Fixes mouse clicks triggering seek calls
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=9a0fac4581dc46fcdb1750f7690dab8d21e4f6a1
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 1872c6e..4cd07c4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -752,6 +752,11 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
@TargetApi(12) //only active for Android 3.1+
public boolean dispatchGenericMotionEvent(MotionEvent event){
+ //Check for a joystick event
+ if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) !=
+ InputDevice.SOURCE_JOYSTICK ||
+ event.getAction() != MotionEvent.ACTION_MOVE)
+ return false;
InputDevice mInputDevice = event.getDevice();
More information about the Android
mailing list