diff options
| author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-05-16 09:56:49 +0000 |
|---|---|---|
| committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-05-16 09:56:49 +0000 |
| commit | 071f3e913b675c57120ffa087daee39b075a16ae (patch) | |
| tree | ba7418921265c8887c4a2d3a4c347c0719528b39 /src/input/libdvdnav/highlight.c | |
| parent | 05eea1b8fb20e87c2cb846ac6537371dbdb5ed93 (diff) | |
| download | xine-lib-071f3e913b675c57120ffa087daee39b075a16ae.tar.gz xine-lib-071f3e913b675c57120ffa087daee39b075a16ae.tar.bz2 | |
libdvdnav merge:
* remove some unused files
* dvdnav_internal.h uses the WORDS_BIGENDIAN define from xine-lib's global config.h
* menu command filtering to avoid double commands in the same menu
* message beautification by Jeff Smith
CVS patchset: 4861
CVS date: 2003/05/16 09:56:49
Diffstat (limited to 'src/input/libdvdnav/highlight.c')
| -rw-r--r-- | src/input/libdvdnav/highlight.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/src/input/libdvdnav/highlight.c b/src/input/libdvdnav/highlight.c index 47de16097..c85f59e2c 100644 --- a/src/input/libdvdnav/highlight.c +++ b/src/input/libdvdnav/highlight.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: highlight.c,v 1.14 2003/05/11 13:44:05 jcdutton Exp $ + * $Id: highlight.c,v 1.15 2003/05/16 09:56:50 mroi Exp $ * */ @@ -223,18 +223,16 @@ static btni_t *get_current_button(dvdnav_t *this, pci_t *pci) { if(!this || !pci) { printerr("Passed a NULL pointer."); - return DVDNAV_STATUS_ERR; + return NULL; } if(!pci->hli.hl_gi.hli_ss) { printerr("Not in a menu."); - return DVDNAV_STATUS_ERR; + return NULL; } -#if 0 /* This causes some DVDs to fail to activate buttons. */ if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { printerr("This NAV has already been left."); - return DVDNAV_STATUS_ERR; + return NULL; } -#endif button = this->vm->state.HL_BTNN_REG >> 10; #ifdef BUTTON_TESTING @@ -247,6 +245,7 @@ static btni_t *get_current_button(dvdnav_t *this, pci_t *pci) { static dvdnav_status_t button_auto_action(dvdnav_t *this, pci_t *pci) { if (get_current_button(this, pci)->auto_action_mode) return dvdnav_button_activate(this, pci); + return DVDNAV_STATUS_OK; } dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *this, pci_t *pci) { @@ -256,9 +255,7 @@ dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *this, pci_t *pci) { return DVDNAV_STATUS_ERR; dvdnav_button_select(this, pci, button_ptr->up); - button_auto_action(this, pci); - - return DVDNAV_STATUS_OK; + return button_auto_action(this, pci); } dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *this, pci_t *pci) { @@ -268,9 +265,7 @@ dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *this, pci_t *pci) { return DVDNAV_STATUS_ERR; dvdnav_button_select(this, pci, button_ptr->down); - button_auto_action(this, pci); - - return DVDNAV_STATUS_OK; + return button_auto_action(this, pci); } dvdnav_status_t dvdnav_right_button_select(dvdnav_t *this, pci_t *pci) { @@ -280,9 +275,7 @@ dvdnav_status_t dvdnav_right_button_select(dvdnav_t *this, pci_t *pci) { return DVDNAV_STATUS_ERR; dvdnav_button_select(this, pci, button_ptr->right); - button_auto_action(this, pci); - - return DVDNAV_STATUS_OK; + return button_auto_action(this, pci); } dvdnav_status_t dvdnav_left_button_select(dvdnav_t *this, pci_t *pci) { @@ -292,9 +285,7 @@ dvdnav_status_t dvdnav_left_button_select(dvdnav_t *this, pci_t *pci) { return DVDNAV_STATUS_ERR; dvdnav_button_select(this, pci, button_ptr->left); - button_auto_action(this, pci); - - return DVDNAV_STATUS_OK; + return button_auto_action(this, pci); } dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, @@ -347,12 +338,10 @@ dvdnav_status_t dvdnav_button_activate(dvdnav_t *this, pci_t *pci) { printerr("Not in a menu."); return DVDNAV_STATUS_ERR; } -#if 0 /* This causes some DVDs to fail to activate buttons. */ if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { printerr("This NAV has already been left."); return DVDNAV_STATUS_ERR; } -#endif pthread_mutex_lock(&this->vm_lock); button = this->vm->state.HL_BTNN_REG >> 10; @@ -436,12 +425,10 @@ dvdnav_status_t dvdnav_button_select(dvdnav_t *this, pci_t *pci, int32_t button) printerr("Not in a menu."); return DVDNAV_STATUS_ERR; } -#if 0 /* This causes some DVDs to fail to activate buttons. */ if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { printerr("This NAV has already been left."); return DVDNAV_STATUS_ERR; } -#endif #ifdef BUTTON_TESTING fprintf(MSG_OUT, "libdvdnav: Button select %i\n", button); @@ -479,12 +466,10 @@ dvdnav_status_t dvdnav_mouse_select(dvdnav_t *this, pci_t *pci, int32_t x, int32 printerr("Not in a menu."); return DVDNAV_STATUS_ERR; } -#if 0 /* This causes some DVDs to fail to activate buttons. */ if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { printerr("This NAV has already been left."); return DVDNAV_STATUS_ERR; } -#endif cur_button = this->vm->state.HL_BTNN_REG >> 10; |
