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

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19780 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-09-09 22:40:22 +00:00
parent b464da0a00
commit aab523e18b
3 changed files with 7 additions and 4 deletions

View File

@ -5141,12 +5141,13 @@ if(step_sec>0) {
} 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

View File

@ -431,7 +431,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
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 @@ int mp_dvdnav_handle_input(stream_t *stream, int cmd) {
break;
}
dvdnav_get_current_highlight(nav, button);
return reset;
}

View File

@ -43,6 +43,6 @@ int dvdnav_stream_sleeping(dvdnav_priv_t * dvdnav_priv);
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