[vlc-commits] bluray: enable pop-up menu
Petri Hintukainen
git at videolan.org
Thu Feb 13 12:59:20 CET 2014
vlc | branch: master | Petri Hintukainen <phintuka at users.sourceforge.net> | Thu Feb 13 13:40:27 2014 +0200| [5619508957be5e4651c0b4cd01138db630afaf0d] | committer: Jean-Baptiste Kempf
bluray: enable pop-up menu
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5619508957be5e4651c0b4cd01138db630afaf0d
---
modules/access/bluray.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index adc482f..d50bc68 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -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
More information about the vlc-commits
mailing list