]> git.sesse.net Git - vlc/commitdiff
bluray: enable pop-up menu
authorPetri Hintukainen <phintuka@users.sourceforge.net>
Thu, 13 Feb 2014 11:40:27 +0000 (13:40 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Feb 2014 11:58:48 +0000 (12:58 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/access/bluray.c

index adc482fd98a1b84a7fc6960e153f2fe33554584b..d50bc689bc412179fa73044b96c0931624dc9894 100644 (file)
@@ -136,6 +136,8 @@ struct  demux_sys_t
     bluray_overlay_t    *p_overlays[MAX_OVERLAY];
     int                 current_overlay; // -1 if no current overlay;
     bool                b_menu;
+    bool                b_menu_open;
+    bool                b_popup_available;
 
     /* */
     input_thread_t      *p_input;
@@ -1393,6 +1395,9 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
     }
 
     case DEMUX_NAV_ACTIVATE:
+        if (p_sys->b_popup_available && !p_sys->b_menu_open) {
+            return sendKeyEvent(p_sys, BD_VK_POPUP);
+        }
         return sendKeyEvent(p_sys, BD_VK_ENTER);
     case DEMUX_NAV_UP:
         return sendKeyEvent(p_sys, BD_VK_UP);
@@ -1502,6 +1507,13 @@ static void blurayHandleEvent(demux_t *p_demux, const BD_EVENT *e)
         break;
     case BD_EVENT_ANGLE:
         break;
+    case BD_EVENT_MENU:
+        p_sys->b_menu_open = e->param;
+        break;
+    case BD_EVENT_POPUP:
+        p_sys->b_popup_available = e->param;
+        /* TODO: show / hide pop-up menu button in gui ? */
+        break;
 
     /*
      * stream selection events