[MPlayer-cvslog] r19780 - in trunk: mplayer.c stream/stream_dvdnav.c stream/stream_dvdnav.h

nicodvb subversion at mplayerhq.hu
Sun Sep 10 00:40:22 CEST 2006


Author: nicodvb
Date: Sun Sep 10 00:40:22 2006
New Revision: 19780

Modified:
   trunk/mplayer.c
   trunk/stream/stream_dvdnav.c
   trunk/stream/stream_dvdnav.h

Log:
in mp_dvdnav_handle_input() assign the currently selected button, shown in the OSD by main()

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Sun Sep 10 00:40:22 2006
@@ -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

Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c	(original)
+++ trunk/stream/stream_dvdnav.c	Sun Sep 10 00:40:22 2006
@@ -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;
 }
 

Modified: trunk/stream/stream_dvdnav.h
==============================================================================
--- trunk/stream/stream_dvdnav.h	(original)
+++ trunk/stream/stream_dvdnav.h	Sun Sep 10 00:40:22 2006
@@ -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



More information about the MPlayer-cvslog mailing list