Mercurial > mplayer.hg
changeset 19908:b6aa47caeb72
§Ænitial button value is -1. Only (button>0) is a correct button selection.
Initialized "dvdnav_status_t status" explicitly for clarity.
author | jonas |
---|---|
date | Tue, 19 Sep 2006 21:42:43 +0000 |
parents | 60ef51a1a356 |
children | 282e93cf7617 |
files | mplayer.c stream/stream_dvdnav.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Tue Sep 19 21:18:54 2006 +0000 +++ b/mplayer.c Tue Sep 19 21:42:43 2006 +0000 @@ -5152,7 +5152,7 @@ break; } break; case MP_CMD_SET_MOUSE_POS: { - int button = 0, pointer_x, pointer_y; + int button = -1, pointer_x, pointer_y; double dx, dy; pointer_x = cmd->args[0].v.i; pointer_y = cmd->args[1].v.i; @@ -5168,13 +5168,13 @@ } #ifdef USE_DVDNAV case MP_CMD_DVDNAV: { - int button = 0; + int button = -1; if(stream->type != STREAMTYPE_DVDNAV) break; if(mp_dvdnav_handle_input(stream, cmd->args[0].v.i, &button)) { uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT|(fixed_vo ? INITED_VO : 0))); goto goto_enable_cache; - } else if(button) set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, "Selected button number %d", button); + } else if(button>0) set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, "Selected button number %d", button); break; } #endif
--- a/stream/stream_dvdnav.c Tue Sep 19 21:18:54 2006 +0000 +++ b/stream/stream_dvdnav.c Tue Sep 19 21:42:43 2006 +0000 @@ -436,7 +436,7 @@ 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; + dvdnav_status_t status=DVDNAV_STATUS_ERR; pci_t *pci = dvdnav_get_current_nav_pci(nav); int reset = 0;