[libbluray-devel] Accept mouse events only when HDMV title is running

hpi1 git at videolan.org
Mon Jan 14 09:08:26 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Jan 14 09:58:48 2013 +0200| [4616f6ff3233b9b530b839b4aeec562cc0a87135] | committer: hpi1

Accept mouse events only when HDMV title is running

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=4616f6ff3233b9b530b839b4aeec562cc0a87135
---

 src/libbluray/bluray.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 9f08e59..1272689 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2754,9 +2754,15 @@ void bd_set_scr(BLURAY *bd, int64_t pts)
 
 int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
 {
+    int result = -1;
+
     bd_set_scr(bd, pts);
 
-    return _run_gc(bd, GC_CTRL_MOUSE_MOVE, (x << 16) | y);
+    if (bd->title_type == title_hdmv) {
+        result = _run_gc(bd, GC_CTRL_MOUSE_MOVE, (x << 16) | y);
+    }
+
+    return result;
 }
 
 int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)



More information about the libbluray-devel mailing list