Mercurial > libdvdnav.hg
annotate highlight.c @ 431:fef53ca48541 src
Let dvdnav_describe_title_chapters() skip PGCs with missing cells.
Fixes segfaults with a rip of Ghost Protocol.
Patch by Fabian Keil #fk$fabiankeil%de^
author | rathann |
---|---|
date | Thu, 03 Oct 2013 23:15:54 +0000 |
parents | 47c4e70d43ae |
children |
rev | line source |
---|---|
388 | 1 /* |
0 | 2 * Copyright (C) 2000 Rich Wareham <richwareham@users.sourceforge.net> |
388 | 3 * |
0 | 4 * This file is part of libdvdnav, a DVD navigation library. |
388 | 5 * |
0 | 6 * libdvdnav is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
388 | 10 * |
0 | 11 * libdvdnav is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
388 | 15 * |
389
d3c273ced49c
Use consistent license headers everywhere: Fix wrong FSF address.
diego
parents:
388
diff
changeset
|
16 * You should have received a copy of the GNU General Public License along |
d3c273ced49c
Use consistent license headers everywhere: Fix wrong FSF address.
diego
parents:
388
diff
changeset
|
17 * with libdvdnav; if not, write to the Free Software Foundation, Inc., |
d3c273ced49c
Use consistent license headers everywhere: Fix wrong FSF address.
diego
parents:
388
diff
changeset
|
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
0 | 19 */ |
20 | |
21 #ifdef HAVE_CONFIG_H | |
22 #include "config.h" | |
23 #endif | |
24 | |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
25 #include <assert.h> |
278 | 26 #include <inttypes.h> |
288
ce4230602517
moved away from dvdnav_internal.h inclusion of various system headers
nicodvb
parents:
285
diff
changeset
|
27 #include <stdlib.h> |
ce4230602517
moved away from dvdnav_internal.h inclusion of various system headers
nicodvb
parents:
285
diff
changeset
|
28 #include <stdio.h> |
294
2146ff691bcd
include limits.h; it was included in the previous dvdnav_internal.h and without it players segfault
nicodvb
parents:
290
diff
changeset
|
29 #include <limits.h> |
288
ce4230602517
moved away from dvdnav_internal.h inclusion of various system headers
nicodvb
parents:
285
diff
changeset
|
30 #include <string.h> |
290 | 31 #include <sys/time.h> |
386 | 32 #include <dvdread/nav_types.h> |
395
9c5aef10d165
Move dvd_types.h, dvdnav_events.h and dvdnav.h into a dvdnav directory.
reimar
parents:
392
diff
changeset
|
33 #include "dvdnav/dvdnav.h" |
285
52877d182e96
moved all header inclusions from .h to .c files; my word, I've never seen such a horrible entanglement as in this mess
nicodvb
parents:
278
diff
changeset
|
34 #include "remap.h" |
52877d182e96
moved all header inclusions from .h to .c files; my word, I've never seen such a horrible entanglement as in this mess
nicodvb
parents:
278
diff
changeset
|
35 #include "vm/decoder.h" |
52877d182e96
moved all header inclusions from .h to .c files; my word, I've never seen such a horrible entanglement as in this mess
nicodvb
parents:
278
diff
changeset
|
36 #include "vm/vm.h" |
52877d182e96
moved all header inclusions from .h to .c files; my word, I've never seen such a horrible entanglement as in this mess
nicodvb
parents:
278
diff
changeset
|
37 #include "vm/vmcmd.h" |
0 | 38 #include "dvdnav_internal.h" |
39 | |
114 | 40 /* |
41 #define BUTTON_TESTING | |
42 */ | |
43 | |
0 | 44 #ifdef BUTTON_TESTING |
114 | 45 |
169 | 46 #include "nav_print.h" |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
47 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
48 static void print_time(dvd_time_t *dtime) { |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
49 const char *rate; |
114 | 50 |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
51 assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
52 assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
53 assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
54 assert((dtime->frame_u&0xf) < 0xa); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
55 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
56 fprintf(MSG_OUT,"%02x:%02x:%02x.%02x", |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
57 dtime->hour, |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
58 dtime->minute, |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
59 dtime->second, |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
60 dtime->frame_u & 0x3f); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
61 switch((dtime->frame_u & 0xc0) >> 6) { |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
62 case 1: |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
63 rate = "25.00"; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
64 break; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
65 case 3: |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
66 rate = "29.97"; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
67 break; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
68 default: |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
69 rate = "(please send a bug report)"; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
70 break; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
71 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
72 fprintf(MSG_OUT," @ %s fps", rate); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
73 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
74 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
75 static void nav_print_PCI_GI(pci_gi_t *pci_gi) { |
196 | 76 int32_t i; |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
77 |
114 | 78 fprintf(MSG_OUT,"libdvdnav: pci_gi:\n"); |
79 fprintf(MSG_OUT,"libdvdnav: nv_pck_lbn 0x%08x\n", pci_gi->nv_pck_lbn); | |
80 fprintf(MSG_OUT,"libdvdnav: vobu_cat 0x%04x\n", pci_gi->vobu_cat); | |
81 fprintf(MSG_OUT,"libdvdnav: vobu_uop_ctl 0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl); | |
82 fprintf(MSG_OUT,"libdvdnav: vobu_s_ptm 0x%08x\n", pci_gi->vobu_s_ptm); | |
83 fprintf(MSG_OUT,"libdvdnav: vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm); | |
84 fprintf(MSG_OUT,"libdvdnav: vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm); | |
85 fprintf(MSG_OUT,"libdvdnav: e_eltm "); | |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
86 print_time(&pci_gi->e_eltm); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
87 fprintf(MSG_OUT,"\n"); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
88 |
114 | 89 fprintf(MSG_OUT,"libdvdnav: vobu_isrc \""); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
90 for(i = 0; i < 32; i++) { |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
91 char c = pci_gi->vobu_isrc[i]; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
92 if((c >= ' ') && (c <= '~')) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
93 fprintf(MSG_OUT,"%c", c); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
94 else |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
95 fprintf(MSG_OUT,"."); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
96 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
97 fprintf(MSG_OUT,"\"\n"); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
98 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
99 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
100 static void nav_print_NSML_AGLI(nsml_agli_t *nsml_agli) { |
196 | 101 int32_t i, j = 0; |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
102 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
103 for(i = 0; i < 9; i++) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
104 j |= nsml_agli->nsml_agl_dsta[i]; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
105 if(j == 0) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
106 return; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
107 |
114 | 108 fprintf(MSG_OUT,"libdvdnav: nsml_agli:\n"); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
109 for(i = 0; i < 9; i++) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
110 if(nsml_agli->nsml_agl_dsta[i]) |
114 | 111 fprintf(MSG_OUT,"libdvdnav: nsml_agl_c%d_dsta 0x%08x\n", i + 1, |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
112 nsml_agli->nsml_agl_dsta[i]); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
113 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
114 |
196 | 115 static void nav_print_HL_GI(hl_gi_t *hl_gi, int32_t *btngr_ns, int32_t *btn_ns) { |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
116 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
117 if((hl_gi->hli_ss & 0x03) == 0) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
118 return; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
119 |
114 | 120 fprintf(MSG_OUT,"libdvdnav: hl_gi:\n"); |
121 fprintf(MSG_OUT,"libdvdnav: hli_ss 0x%01x\n", hl_gi->hli_ss & 0x03); | |
122 fprintf(MSG_OUT,"libdvdnav: hli_s_ptm 0x%08x\n", hl_gi->hli_s_ptm); | |
123 fprintf(MSG_OUT,"libdvdnav: hli_e_ptm 0x%08x\n", hl_gi->hli_e_ptm); | |
124 fprintf(MSG_OUT,"libdvdnav: btn_se_e_ptm 0x%08x\n", hl_gi->btn_se_e_ptm); | |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
125 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
126 *btngr_ns = hl_gi->btngr_ns; |
114 | 127 fprintf(MSG_OUT,"libdvdnav: btngr_ns %d\n", hl_gi->btngr_ns); |
128 fprintf(MSG_OUT,"libdvdnav: btngr%d_dsp_ty 0x%02x\n", 1, hl_gi->btngr1_dsp_ty); | |
129 fprintf(MSG_OUT,"libdvdnav: btngr%d_dsp_ty 0x%02x\n", 2, hl_gi->btngr2_dsp_ty); | |
130 fprintf(MSG_OUT,"libdvdnav: btngr%d_dsp_ty 0x%02x\n", 3, hl_gi->btngr3_dsp_ty); | |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
131 |
114 | 132 fprintf(MSG_OUT,"libdvdnav: btn_ofn %d\n", hl_gi->btn_ofn); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
133 *btn_ns = hl_gi->btn_ns; |
114 | 134 fprintf(MSG_OUT,"libdvdnav: btn_ns %d\n", hl_gi->btn_ns); |
135 fprintf(MSG_OUT,"libdvdnav: nsl_btn_ns %d\n", hl_gi->nsl_btn_ns); | |
136 fprintf(MSG_OUT,"libdvdnav: fosl_btnn %d\n", hl_gi->fosl_btnn); | |
137 fprintf(MSG_OUT,"libdvdnav: foac_btnn %d\n", hl_gi->foac_btnn); | |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
138 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
139 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
140 static void nav_print_BTN_COLIT(btn_colit_t *btn_colit) { |
196 | 141 int32_t i, j; |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
142 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
143 j = 0; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
144 for(i = 0; i < 6; i++) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
145 j |= btn_colit->btn_coli[i/2][i&1]; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
146 if(j == 0) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
147 return; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
148 |
114 | 149 fprintf(MSG_OUT,"libdvdnav: btn_colit:\n"); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
150 for(i = 0; i < 3; i++) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
151 for(j = 0; j < 2; j++) |
114 | 152 fprintf(MSG_OUT,"libdvdnav: btn_cqoli %d %s_coli: %08x\n", |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
153 i, (j == 0) ? "sl" : "ac", |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
154 btn_colit->btn_coli[i][j]); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
155 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
156 |
196 | 157 static void nav_print_BTNIT(btni_t *btni_table, int32_t btngr_ns, int32_t btn_ns) { |
158 int32_t i, j, k; | |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
159 |
114 | 160 fprintf(MSG_OUT,"libdvdnav: btnit:\n"); |
161 fprintf(MSG_OUT,"libdvdnav: btngr_ns: %i\n", btngr_ns); | |
162 fprintf(MSG_OUT,"libdvdnav: btn_ns: %i\n", btn_ns); | |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
163 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
164 if(btngr_ns == 0) |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
165 return; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
166 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
167 for(i = 0; i < btngr_ns; i++) { |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
168 for(j = 0; j < (36 / btngr_ns); j++) { |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
169 if(j < btn_ns) { |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
170 btni_t *btni = &btni_table[(36 / btngr_ns) * i + j]; |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
171 |
114 | 172 fprintf(MSG_OUT,"libdvdnav: group %d btni %d: ", i+1, j+1); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
173 fprintf(MSG_OUT,"btn_coln %d, auto_action_mode %d\n", |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
174 btni->btn_coln, btni->auto_action_mode); |
114 | 175 fprintf(MSG_OUT,"libdvdnav: coords (%d, %d) .. (%d, %d)\n", |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
176 btni->x_start, btni->y_start, btni->x_end, btni->y_end); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
177 |
114 | 178 fprintf(MSG_OUT,"libdvdnav: up %d, ", btni->up); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
179 fprintf(MSG_OUT,"down %d, ", btni->down); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
180 fprintf(MSG_OUT,"left %d, ", btni->left); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
181 fprintf(MSG_OUT,"right %d\n", btni->right); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
182 for(k = 0; k < 8; k++) { |
114 | 183 fprintf(MSG_OUT, "libdvdnav: %02x ", btni->cmd.bytes[k]); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
184 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
185 fprintf(MSG_OUT, "| "); |
166 | 186 #ifdef TRACE |
153 | 187 vm_print_mnemonic(&btni->cmd); |
166 | 188 #endif |
114 | 189 fprintf(MSG_OUT, "\n"); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
190 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
191 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
192 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
193 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
194 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
195 static void nav_print_HLI(hli_t *hli) { |
196 | 196 int32_t btngr_ns = 0, btn_ns = 0; |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
197 |
114 | 198 fprintf(MSG_OUT,"libdvdnav: hli:\n"); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
199 nav_print_HL_GI(&hli->hl_gi, & btngr_ns, & btn_ns); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
200 nav_print_BTN_COLIT(&hli->btn_colit); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
201 nav_print_BTNIT(hli->btnit, btngr_ns, btn_ns); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
202 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
203 |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
204 void nav_print_PCI(pci_t *pci) { |
114 | 205 fprintf(MSG_OUT,"libdvdnav: pci packet:\n"); |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
206 nav_print_PCI_GI(&pci->pci_gi); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
207 nav_print_NSML_AGLI(&pci->nsml_agli); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
208 nav_print_HLI(&pci->hli); |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
209 } |
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
210 |
114 | 211 #endif |
86
129ac4af16a4
Improve debugging output to help with debugging button activations.
jcdutton
parents:
76
diff
changeset
|
212 |
0 | 213 |
214 /* Highlighting API calls */ | |
215 | |
196 | 216 dvdnav_status_t dvdnav_get_current_highlight(dvdnav_t *this, int32_t *button) { |
0 | 217 /* Simply return the appropriate value based on the SPRM */ |
205
ba43bdbb07e8
Update to allow events sent to the gui to tell it whether we are in a button or not.
jcdutton
parents:
197
diff
changeset
|
218 if(((*button) = this->position_current.button) == -1) |
ba43bdbb07e8
Update to allow events sent to the gui to tell it whether we are in a button or not.
jcdutton
parents:
197
diff
changeset
|
219 (*button) = this->vm->state.HL_BTNN_REG >> 10; |
388 | 220 |
193 | 221 return DVDNAV_STATUS_OK; |
0 | 222 } |
223 | |
114 | 224 static btni_t *get_current_button(dvdnav_t *this, pci_t *pci) { |
196 | 225 int32_t button = 0; |
0 | 226 |
166 | 227 if(!pci->hli.hl_gi.hli_ss) { |
228 printerr("Not in a menu."); | |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
229 return NULL; |
166 | 230 } |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
231 if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { |
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
232 printerr("This NAV has already been left."); |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
233 return NULL; |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
234 } |
117 | 235 |
236 button = this->vm->state.HL_BTNN_REG >> 10; | |
0 | 237 #ifdef BUTTON_TESTING |
166 | 238 nav_print_PCI(pci); |
0 | 239 #endif |
388 | 240 |
98 | 241 return &(pci->hli.btnit[button-1]); |
0 | 242 } |
243 | |
114 | 244 static dvdnav_status_t button_auto_action(dvdnav_t *this, pci_t *pci) { |
245 if (get_current_button(this, pci)->auto_action_mode) | |
246 return dvdnav_button_activate(this, pci); | |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
247 return DVDNAV_STATUS_OK; |
29 | 248 } |
249 | |
98 | 250 dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *this, pci_t *pci) { |
0 | 251 btni_t *button_ptr; |
388 | 252 |
114 | 253 if(!(button_ptr = get_current_button(this, pci))) |
193 | 254 return DVDNAV_STATUS_ERR; |
114 | 255 |
98 | 256 dvdnav_button_select(this, pci, button_ptr->up); |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
257 return button_auto_action(this, pci); |
0 | 258 } |
259 | |
98 | 260 dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *this, pci_t *pci) { |
0 | 261 btni_t *button_ptr; |
388 | 262 |
114 | 263 if(!(button_ptr = get_current_button(this, pci))) |
193 | 264 return DVDNAV_STATUS_ERR; |
114 | 265 |
98 | 266 dvdnav_button_select(this, pci, button_ptr->down); |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
267 return button_auto_action(this, pci); |
0 | 268 } |
269 | |
98 | 270 dvdnav_status_t dvdnav_right_button_select(dvdnav_t *this, pci_t *pci) { |
0 | 271 btni_t *button_ptr; |
388 | 272 |
114 | 273 if(!(button_ptr = get_current_button(this, pci))) |
193 | 274 return DVDNAV_STATUS_ERR; |
114 | 275 |
98 | 276 dvdnav_button_select(this, pci, button_ptr->right); |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
277 return button_auto_action(this, pci); |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
278 } |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
279 |
98 | 280 dvdnav_status_t dvdnav_left_button_select(dvdnav_t *this, pci_t *pci) { |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
281 btni_t *button_ptr; |
388 | 282 |
114 | 283 if(!(button_ptr = get_current_button(this, pci))) |
193 | 284 return DVDNAV_STATUS_ERR; |
114 | 285 |
98 | 286 dvdnav_button_select(this, pci, button_ptr->left); |
197
a20a5976a207
last_cmd_nav_lbn has to be initialized with an invalid value, so that the first
mroi
parents:
196
diff
changeset
|
287 return button_auto_action(this, pci); |
0 | 288 } |
289 | |
388 | 290 dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, |
114 | 291 dvdnav_highlight_area_t *highlight) { |
0 | 292 btni_t *button_ptr; |
114 | 293 |
31 | 294 #ifdef BUTTON_TESTING |
76 | 295 fprintf(MSG_OUT, "libdvdnav: Button get_highlight_area %i\n", button); |
31 | 296 #endif |
388 | 297 |
166 | 298 if(!nav_pci->hli.hl_gi.hli_ss) |
193 | 299 return DVDNAV_STATUS_ERR; |
114 | 300 if((button <= 0) || (button > nav_pci->hli.hl_gi.btn_ns)) |
193 | 301 return DVDNAV_STATUS_ERR; |
114 | 302 |
166 | 303 |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
304 button_ptr = &nav_pci->hli.btnit[button-1]; |
0 | 305 |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
306 highlight->sx = button_ptr->x_start; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
307 highlight->sy = button_ptr->y_start; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
308 highlight->ex = button_ptr->x_end; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
309 highlight->ey = button_ptr->y_end; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
310 if(button_ptr->btn_coln != 0) { |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
311 highlight->palette = nav_pci->hli.btn_colit.btn_coli[button_ptr->btn_coln-1][mode]; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
312 } else { |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
313 highlight->palette = 0; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
314 } |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
315 highlight->pts = nav_pci->hli.hl_gi.hli_s_ptm; |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
316 highlight->buttonN = button; |
31 | 317 #ifdef BUTTON_TESTING |
114 | 318 fprintf(MSG_OUT, "libdvdnav: highlight: Highlight area is (%u,%u)-(%u,%u), display = %i, button = %u\n", |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
319 button_ptr->x_start, button_ptr->y_start, |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
320 button_ptr->x_end, button_ptr->y_end, |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
321 1, |
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
322 button); |
31 | 323 #endif |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
324 |
193 | 325 return DVDNAV_STATUS_OK; |
0 | 326 } |
327 | |
98 | 328 dvdnav_status_t dvdnav_button_activate(dvdnav_t *this, pci_t *pci) { |
196 | 329 int32_t button; |
26 | 330 btni_t *button_ptr = NULL; |
114 | 331 |
166 | 332 if(!pci->hli.hl_gi.hli_ss) { |
333 printerr("Not in a menu."); | |
193 | 334 return DVDNAV_STATUS_ERR; |
166 | 335 } |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
336 if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { |
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
337 printerr("This NAV has already been left."); |
193 | 338 return DVDNAV_STATUS_ERR; |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
339 } |
388 | 340 pthread_mutex_lock(&this->vm_lock); |
0 | 341 |
117 | 342 button = this->vm->state.HL_BTNN_REG >> 10; |
114 | 343 |
344 if((button <= 0) || (button > pci->hli.hl_gi.btn_ns)) { | |
57 | 345 /* Special code to handle still menus with no buttons. |
166 | 346 * The navigation is expected to report to the application that a STILL is |
57 | 347 * underway. In turn, the application is supposed to report to the user |
166 | 348 * that the playback is paused. The user is then expected to undo the pause, |
57 | 349 * ie: hit play. At that point, the navigation should release the still and |
350 * go to the next Cell. | |
166 | 351 * Explanation by Mathieu Lacage <mathieu_lacage@realmagic.fr> |
57 | 352 * Code added by jcdutton. |
353 */ | |
354 if (this->position_current.still != 0) { | |
355 /* In still, but no buttons. */ | |
356 vm_get_next_cell(this->vm); | |
357 this->position_current.still = 0; | |
116 | 358 this->sync_wait = 0; |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
359 this->last_cmd_nav_lbn = pci->pci_gi.nv_pck_lbn; |
57 | 360 pthread_mutex_unlock(&this->vm_lock); |
114 | 361 /* clear error message */ |
362 printerr(""); | |
193 | 363 return DVDNAV_STATUS_OK; |
57 | 364 } |
388 | 365 pthread_mutex_unlock(&this->vm_lock); |
193 | 366 return DVDNAV_STATUS_ERR; |
0 | 367 } |
388 | 368 |
114 | 369 button_ptr = get_current_button(this, pci); |
370 /* Finally, make the VM execute the appropriate code and probably | |
415 | 371 * schedule a jump */ |
31 | 372 #ifdef BUTTON_TESTING |
76 | 373 fprintf(MSG_OUT, "libdvdnav: Evaluating Button Activation commands.\n"); |
31 | 374 #endif |
114 | 375 if(vm_exec_cmd(this->vm, &(button_ptr->cmd)) == 1) { |
26 | 376 /* Command caused a jump */ |
377 this->vm->hop_channel++; | |
378 this->position_current.still = 0; | |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
379 this->last_cmd_nav_lbn = pci->pci_gi.nv_pck_lbn; |
0 | 380 } |
388 | 381 |
382 pthread_mutex_unlock(&this->vm_lock); | |
193 | 383 return DVDNAV_STATUS_OK; |
0 | 384 } |
385 | |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
386 dvdnav_status_t dvdnav_button_activate_cmd(dvdnav_t *this, int32_t button, vm_cmd_t *cmd) |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
387 { |
114 | 388 pthread_mutex_lock(&this->vm_lock); |
389 /* make the VM execute the appropriate code and probably | |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
390 * schedule a jump */ |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
391 #ifdef BUTTON_TESTING |
114 | 392 fprintf(MSG_OUT, "libdvdnav: dvdnav_button_activate_cmd: Evaluating Button Activation commands.\n"); |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
393 #endif |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
394 if(button > 0) { |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
395 this->vm->state.HL_BTNN_REG = (button << 10); |
114 | 396 if(vm_exec_cmd(this->vm, cmd) == 1) { |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
397 /* Command caused a jump */ |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
398 this->vm->hop_channel++; |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
399 } |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
400 } |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
401 /* Always remove still, because some still menus have no buttons. */ |
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
402 this->position_current.still = 0; |
116 | 403 this->sync_wait = 0; |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
404 pthread_mutex_unlock(&this->vm_lock); |
193 | 405 return DVDNAV_STATUS_OK; |
388 | 406 } |
91
df9712507b30
Add a new API function, to allow for more flexible menu button control.
jcdutton
parents:
86
diff
changeset
|
407 |
196 | 408 dvdnav_status_t dvdnav_button_select(dvdnav_t *this, pci_t *pci, int32_t button) { |
166 | 409 if(!pci->hli.hl_gi.hli_ss) { |
410 printerr("Not in a menu."); | |
193 | 411 return DVDNAV_STATUS_ERR; |
166 | 412 } |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
413 if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { |
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
414 printerr("This NAV has already been left."); |
193 | 415 return DVDNAV_STATUS_ERR; |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
416 } |
388 | 417 |
31 | 418 #ifdef BUTTON_TESTING |
388 | 419 fprintf(MSG_OUT, "libdvdnav: Button select %i\n", button); |
31 | 420 #endif |
388 | 421 |
98 | 422 if((button <= 0) || (button > pci->hli.hl_gi.btn_ns)) { |
114 | 423 printerr("Button does not exist."); |
193 | 424 return DVDNAV_STATUS_ERR; |
0 | 425 } |
388 | 426 |
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
10
diff
changeset
|
427 this->vm->state.HL_BTNN_REG = (button << 10); |
415 | 428 this->position_current.button = -1; /* Force Highlight change */ |
0 | 429 |
193 | 430 return DVDNAV_STATUS_OK; |
0 | 431 } |
432 | |
388 | 433 dvdnav_status_t dvdnav_button_select_and_activate(dvdnav_t *this, pci_t *pci, |
196 | 434 int32_t button) { |
0 | 435 /* A trivial function */ |
193 | 436 if(dvdnav_button_select(this, pci, button) != DVDNAV_STATUS_ERR) |
98 | 437 return dvdnav_button_activate(this, pci); |
193 | 438 return DVDNAV_STATUS_ERR; |
0 | 439 } |
440 | |
196 | 441 dvdnav_status_t dvdnav_mouse_select(dvdnav_t *this, pci_t *pci, int32_t x, int32_t y) { |
442 int32_t button, cur_button; | |
443 int32_t best,dist,d; | |
444 int32_t mx,my,dx,dy; | |
69 | 445 |
166 | 446 if(!pci->hli.hl_gi.hli_ss) { |
447 printerr("Not in a menu."); | |
193 | 448 return DVDNAV_STATUS_ERR; |
166 | 449 } |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
450 if(this->last_cmd_nav_lbn == pci->pci_gi.nv_pck_lbn) { |
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
451 printerr("This NAV has already been left."); |
193 | 452 return DVDNAV_STATUS_ERR; |
191
dbea22936623
when a command has been issued to leave a menu, filter all further commands
mroi
parents:
169
diff
changeset
|
453 } |
0 | 454 |
117 | 455 cur_button = this->vm->state.HL_BTNN_REG >> 10; |
114 | 456 |
457 best = 0; | |
69 | 458 dist = 0x08000000; /* >> than (720*720)+(567*567); */ |
388 | 459 |
114 | 460 /* Loop through all buttons */ |
461 for(button = 1; button <= pci->hli.hl_gi.btn_ns; button++) { | |
227
10af49ee5118
Fix a bug. We pass pci_t as a function param, so why bother looking at an
jcdutton
parents:
205
diff
changeset
|
462 btni_t *button_ptr = &(pci->hli.btnit[button-1]); |
10af49ee5118
Fix a bug. We pass pci_t as a function param, so why bother looking at an
jcdutton
parents:
205
diff
changeset
|
463 |
0 | 464 if((x >= button_ptr->x_start) && (x <= button_ptr->x_end) && |
465 (y >= button_ptr->y_start) && (y <= button_ptr->y_end)) { | |
69 | 466 mx = (button_ptr->x_start + button_ptr->x_end)/2; |
114 | 467 my = (button_ptr->y_start + button_ptr->y_end)/2; |
69 | 468 dx = mx - x; |
469 dy = my - y; | |
470 d = (dx*dx) + (dy*dy); | |
471 /* If the mouse is within the button and the mouse is closer | |
472 * to the center of this button then it is the best choice. */ | |
473 if(d < dist) { | |
114 | 474 dist = d; |
475 best = button; | |
0 | 476 } |
477 } | |
478 } | |
114 | 479 /* As an efficiency measure, only re-select the button |
480 * if it is different to the previously selected one. */ | |
481 if (best != 0 && best != cur_button) | |
482 dvdnav_button_select(this, pci, best); | |
483 | |
193 | 484 /* return DVDNAV_STATUS_OK only if we actually found a matching button */ |
485 return best ? DVDNAV_STATUS_OK : DVDNAV_STATUS_ERR; | |
0 | 486 } |
487 | |
196 | 488 dvdnav_status_t dvdnav_mouse_activate(dvdnav_t *this, pci_t *pci, int32_t x, int32_t y) { |
0 | 489 /* A trivial function */ |
193 | 490 if(dvdnav_mouse_select(this, pci, x,y) != DVDNAV_STATUS_ERR) |
98 | 491 return dvdnav_button_activate(this, pci); |
193 | 492 return DVDNAV_STATUS_ERR; |
0 | 493 } |