changeset 19777:bb1b570ac7c1

permit to select previous dvdnav menu, in the order chapter->title->root
author nicodvb
date Sun, 10 Sep 2006 10:25:48 +0000
parents 8be8aac9ca76
children b7bba0853adf
files input/input.c input/input.h stream/stream_dvdnav.c
diffstat 3 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Sat Sep 09 23:08:25 2006 +0000
+++ b/input/input.c	Sun Sep 10 10:25:48 2006 +0000
@@ -317,6 +317,7 @@
   { { 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" },
--- a/input/input.h	Sat Sep 09 23:08:25 2006 +0000
+++ b/input/input.h	Sun Sep 10 10:25:48 2006 +0000
@@ -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
--- a/stream/stream_dvdnav.c	Sat Sep 09 23:08:25 2006 +0000
+++ b/stream/stream_dvdnav.c	Sun Sep 10 10:25:48 2006 +0000
@@ -458,6 +458,21 @@
       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;