[vlc-devel] [PATCH 2/2] bluray: enable pop-up menu
Petri Hintukainen
phintuka at users.sourceforge.net
Thu Feb 13 12:40:27 CET 2014
---
modules/access/bluray.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index ce1cc7b..7027764 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;
@@ -1391,6 +1393,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);
@@ -1500,6 +1505,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
--
1.8.3.2
More information about the vlc-devel
mailing list