Mercurial > libdvdnav.hg
comparison highlight.c @ 31:8b08ee66cbff src
Quiet please!!!
author | jcdutton |
---|---|
date | Wed, 24 Apr 2002 21:15:25 +0000 |
parents | 630b6733e492 |
children | 131ad65a2398 |
comparison
equal
deleted
inserted
replaced
30:630b6733e492 | 31:8b08ee66cbff |
---|---|
162 } | 162 } |
163 | 163 |
164 dvdnav_status_t dvdnav_get_highlight_area(pci_t* nav_pci , int32_t button, int32_t mode, | 164 dvdnav_status_t dvdnav_get_highlight_area(pci_t* nav_pci , int32_t button, int32_t mode, |
165 dvdnav_highlight_area_t* highlight) { | 165 dvdnav_highlight_area_t* highlight) { |
166 btni_t *button_ptr; | 166 btni_t *button_ptr; |
167 #ifdef BUTTON_TESTING | |
167 fprintf(stderr,"Button get_highlight_area %i\n", button); | 168 fprintf(stderr,"Button get_highlight_area %i\n", button); |
169 #endif | |
168 | 170 |
169 /* Set the highlight SPRM if the passed button was valid*/ | 171 /* Set the highlight SPRM if the passed button was valid*/ |
170 if((button <= 0) || (button > nav_pci->hli.hl_gi.btn_ns)) { | 172 if((button <= 0) || (button > nav_pci->hli.hl_gi.btn_ns)) { |
171 fprintf(stderr,"Unable to select button number %i as it doesn't exist\n", | 173 fprintf(stderr,"Unable to select button number %i as it doesn't exist\n", |
172 button); | 174 button); |
183 } else { | 185 } else { |
184 highlight->palette = 0; | 186 highlight->palette = 0; |
185 } | 187 } |
186 highlight->pts = nav_pci->hli.hl_gi.hli_s_ptm; | 188 highlight->pts = nav_pci->hli.hl_gi.hli_s_ptm; |
187 highlight->buttonN = button; | 189 highlight->buttonN = button; |
188 //#ifdef BUTTON_TESTING | 190 #ifdef BUTTON_TESTING |
189 fprintf(stderr,"highlight.c:Highlight area is (%u,%u)-(%u,%u), display = %i, button = %u\n", | 191 fprintf(stderr,"highlight.c:Highlight area is (%u,%u)-(%u,%u), display = %i, button = %u\n", |
190 button_ptr->x_start, button_ptr->y_start, | 192 button_ptr->x_start, button_ptr->y_start, |
191 button_ptr->x_end, button_ptr->y_end, | 193 button_ptr->x_end, button_ptr->y_end, |
192 1, | 194 1, |
193 button); | 195 button); |
194 //#endif | 196 #endif |
195 | 197 |
196 return S_OK; | 198 return S_OK; |
197 } | 199 } |
198 | 200 |
199 dvdnav_status_t dvdnav_button_activate(dvdnav_t *this) { | 201 dvdnav_status_t dvdnav_button_activate(dvdnav_t *this) { |
216 } | 218 } |
217 /* FIXME: The button command should really be passed in the API instead. */ | 219 /* FIXME: The button command should really be passed in the API instead. */ |
218 button_ptr = __get_current_button(this); | 220 button_ptr = __get_current_button(this); |
219 /* Finally, make the VM execute the appropriate code and | 221 /* Finally, make the VM execute the appropriate code and |
220 * scedule a jump */ | 222 * scedule a jump */ |
223 #ifdef BUTTON_TESTING | |
221 fprintf(stderr, "libdvdnav: Evaluating Button Activation commands.\n"); | 224 fprintf(stderr, "libdvdnav: Evaluating Button Activation commands.\n"); |
225 #endif | |
222 if(vm_eval_cmd(this->vm, &(button_ptr->cmd)) == 1) { | 226 if(vm_eval_cmd(this->vm, &(button_ptr->cmd)) == 1) { |
223 /* Command caused a jump */ | 227 /* Command caused a jump */ |
224 this->vm->hop_channel++; | 228 this->vm->hop_channel++; |
225 this->position_current.still = 0; | 229 this->position_current.still = 0; |
226 } | 230 } |
234 printerrf("Unable to select button number %i as this state bad", | 238 printerrf("Unable to select button number %i as this state bad", |
235 button); | 239 button); |
236 return S_ERR; | 240 return S_ERR; |
237 } | 241 } |
238 | 242 |
239 fprintf(stderr,"Button select %i\n", button); | 243 #ifdef BUTTON_TESTING |
244 fprintf(stderr,"libdvdnav: Button select %i\n", button); | |
245 #endif | |
240 | 246 |
241 /* Set the highlight SPRM if the passed button was valid*/ | 247 /* Set the highlight SPRM if the passed button was valid*/ |
242 if((button <= 0) || (button > this->pci.hli.hl_gi.btn_ns)) { | 248 if((button <= 0) || (button > this->pci.hli.hl_gi.btn_ns)) { |
243 printerrf("Unable to select button number %i as it doesn't exist", | 249 printerrf("Unable to select button number %i as it doesn't exist", |
244 button); | 250 button); |