From caa3c79989358bb4a636687b7d7e78ce5ab69075 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sun, 10 Sep 2006 10:25:48 +0000 Subject: permit to select previous dvdnav menu, in the order chapter->title->root git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19783 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 1 + input/input.h | 1 + stream/stream_dvdnav.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/input/input.c b/input/input.c index 8ee628b76f..79e211705e 100644 --- a/input/input.c +++ b/input/input.c @@ -317,6 +317,7 @@ static mp_cmd_bind_t def_cmd_binds[] = { { { KEY_KP6, 0 }, "dvdnav 4" }, // right { { KEY_KP5, 0 }, "dvdnav 5" }, // menu { { KEY_KPENTER, 0 }, "dvdnav 6" }, // select + { { KEY_KP7, 0 }, "dvdnav 7" }, // previous menu #endif { { KEY_RIGHT, 0 }, "seek 10" }, diff --git a/input/input.h b/input/input.h index df1c964287..dc4da8899d 100644 --- a/input/input.h +++ b/input/input.h @@ -113,6 +113,7 @@ #define MP_CMD_DVDNAV_RIGHT 4 #define MP_CMD_DVDNAV_MENU 5 #define MP_CMD_DVDNAV_SELECT 6 +#define MP_CMD_DVDNAV_PREVMENU 7 /// Console commands #define MP_CMD_CHELP 7000 diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 6e9eb37d9e..6d5d62cf69 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -458,6 +458,21 @@ int mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button) { status = dvdnav_menu_call(nav,DVD_MENU_Root); reset = 1; break; + case MP_CMD_DVDNAV_PREVMENU: { + int title=0, part=0; + + dvdnav_current_title_info(nav, &title, &part); + if(title) { + if(dvdnav_menu_call(nav, DVD_MENU_Part) == DVDNAV_STATUS_OK + || dvdnav_menu_call(nav, DVD_MENU_Title) == DVDNAV_STATUS_OK) { + reset = 1; + break; + } + } + if(dvdnav_menu_call(nav, DVD_MENU_Root) == DVDNAV_STATUS_OK) + reset = 1; + } + break; case MP_CMD_DVDNAV_SELECT: status = dvdnav_button_activate(nav, pci); reset = 1; -- cgit v1.2.3