[libbluray-devel] Modify BD-J remote control capabilities to have release event

tourettes git at videolan.org
Mon Oct 27 09:55:19 CET 2014


libbluray | branch: master | tourettes <tourettes at team-mediaportal.com> | Sat Oct 25 14:55:03 2014 +0300| [6642237bf37bf63857ca949d58bcdaa91e36f005] | committer: hpi1

Modify BD-J remote control capabilities to have release event

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

 src/libbluray/bdj/java/org/videolan/Libbluray.java |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index a7c1cb7..0d884d9 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -111,8 +111,8 @@ public class Libbluray {
 
             System.setProperty("bluray.jmf.subtitlestyle", "YES");
 
-            System.setProperty("bluray.rccapability.release", "No");
-            System.setProperty("bluray.rccapability.holdandrelease", "NO");
+            System.setProperty("bluray.rccapability.release", "YES");
+            System.setProperty("bluray.rccapability.holdandrelease", "YES");
             System.setProperty("bluray.rccapability.repeatonhold", "NO");
 
             System.setProperty("bluray.localstorage.level", "5");
@@ -423,9 +423,6 @@ public class Libbluray {
             PlayerManager.getInstance().onPlaylistTime(param);
             break;
         case BDJ_EVENT_VK_KEY:
-            //case KeyEvent.KEY_TYPED:
-            //case KeyEvent.KEY_PRESSED:
-            //case KeyEvent.KEY_RELEASED:
             switch (param) {
             case  0: key = KeyEvent.VK_0; break;
             case  1: key = KeyEvent.VK_1; break;
@@ -453,10 +450,10 @@ public class Libbluray {
                 break;
             }
             if (key > 0) {
-                result =
-                    EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_PRESSED, 0, key) ||
-                    EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_RELEASED, 0, key) ||
-                    EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_TYPED, 0, key);
+                boolean r1 = EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_PRESSED, 0, key);
+                boolean r2 = EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_TYPED, 0, key);
+                boolean r3 = EventManager.getInstance().receiveKeyEventN(KeyEvent.KEY_RELEASED, 0, key);
+                result = r1 || r2 || r3;
             }
             break;
         default:



More information about the libbluray-devel mailing list