changeset 19774:109e241c0cca

in mp_dvdnav_handle_input() assign the currently selected button, shown in the OSD by main()
author nicodvb
date Sat, 09 Sep 2006 22:40:22 +0000
parents 194a53413994
children efe683c3031a
files mplayer.c stream/stream_dvdnav.c stream/stream_dvdnav.h
diffstat 3 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Sep 09 22:40:00 2006 +0000
+++ b/mplayer.c	Sat Sep 09 22:40:22 2006 +0000
@@ -5141,12 +5141,13 @@
     } break;
 #ifdef USE_DVDNAV
     case MP_CMD_DVDNAV: {
+      int button = 0;
       if(stream->type != STREAMTYPE_DVDNAV) break;
 
-      if(mp_dvdnav_handle_input(stream, cmd->args[0].v.i)) {
+      if(mp_dvdnav_handle_input(stream, cmd->args[0].v.i, &button)) {
           uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT));
           goto goto_enable_cache;
-      }
+      } else if(button) set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, "Selected button number %d", button);
       break;
     }
 #endif
--- a/stream/stream_dvdnav.c	Sat Sep 09 22:40:00 2006 +0000
+++ b/stream/stream_dvdnav.c	Sat Sep 09 22:40:22 2006 +0000
@@ -431,7 +431,7 @@
 }
 
 
-int mp_dvdnav_handle_input(stream_t *stream, int cmd) {
+int mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button) {
   dvdnav_priv_t * dvdnav_priv=(dvdnav_priv_t*)stream->priv;
   dvdnav_t *nav = dvdnav_priv->dvdnav;
   dvdnav_status_t status;
@@ -467,6 +467,8 @@
       break;
   }
 
+  dvdnav_get_current_highlight(nav, button);
+
   return reset;
 }
 
--- a/stream/stream_dvdnav.h	Sat Sep 09 22:40:00 2006 +0000
+++ b/stream/stream_dvdnav.h	Sat Sep 09 22:40:22 2006 +0000
@@ -43,6 +43,6 @@
 
 void dvdnav_stream_fullstart(dvdnav_priv_t *dvdnav_priv);
 unsigned int * dvdnav_stream_get_palette(dvdnav_priv_t * dvdnav_priv);
-int mp_dvdnav_handle_input(stream_t *stream, int cmd);
+int mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button);
 
 #endif