Skip to content

Commit

Permalink
bluray: enable pop-up menu
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
hpi1 authored and jbkempf committed Feb 13, 2014
1 parent e1a9f33 commit 5619508
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/access/bluray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand 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
Expand Down

0 comments on commit 5619508

Please sign in to comment.