[Android] Pass the clicking infos

Jean-Baptiste Kempf git at videolan.org
Wed May 14 10:33:23 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue May 13 01:46:55 2014 +0200| [e57bfa6d6a4c04be5f2c8f6aaa86a584de0fa78d] | committer: Jean-Baptiste Kempf

Pass the clicking infos

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e57bfa6d6a4c04be5f2c8f6aaa86a584de0fa78d
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java      |    6 ++++++
 1 file changed, 6 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 33cb279..6822b3d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1148,6 +1148,12 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
             mTouchAction = TOUCH_NONE;
             // Seek
             mTouchX = event.getRawX();
+            // Click DVD menus
+            int offsetX = (screen.widthPixels - mSurface.getWidth()) / 2;
+            int offsetY = (screen.heightPixels - mSurface.getHeight()) / 2;
+            LibVLC.sendMouseEvent( 0,
+                    ((int)mTouchX - offsetX) * mVideoWidth / mSurface.getWidth(),
+                    ((int)mTouchY - offsetY) * mVideoHeight / mSurface.getHeight());
             break;
 
         case MotionEvent.ACTION_MOVE:



More information about the Android mailing list