Mercurial > libdvdnav.hg
comparison highlight.c @ 57:e1505b603eb8 src
Fix problem with Still menus that have NO BUTTONS.
Problem found on DVD: "The Abyss, Special Edition, Disk 2"
in the PERSONNEL LOCKERS.
author | jcdutton |
---|---|
date | Sat, 06 Jul 2002 11:10:11 +0000 |
parents | 131ad65a2398 |
children | 2759605b41f6 |
comparison
equal
deleted
inserted
replaced
56:507b86c503d1 | 57:e1505b603eb8 |
---|---|
210 * a different palette */ | 210 * a different palette */ |
211 if(dvdnav_get_current_highlight(this, &button) != S_OK) { | 211 if(dvdnav_get_current_highlight(this, &button) != S_OK) { |
212 pthread_mutex_unlock(&this->vm_lock); | 212 pthread_mutex_unlock(&this->vm_lock); |
213 return S_ERR; | 213 return S_ERR; |
214 } | 214 } |
215 /* FIXME: dvdnav_button_select should really return a | |
216 * special case for explicit NO-BUTTONS. | |
217 */ | |
215 if(dvdnav_button_select(this, button) != S_OK) { | 218 if(dvdnav_button_select(this, button) != S_OK) { |
219 /* Special code to handle still menus with no buttons. | |
220 * the navigation is expected to report to the appicatino that a STILL is | |
221 * underway. In turn, the application is supposed to report to the user | |
222 * that the playback is pause. The user is then expected to undo the pause. | |
223 * ie: hit play. At that point, the navigation should release the still and | |
224 * go to the next Cell. | |
225 * Explanation by Mathieu Lavage <mathieu_lacage@realmagic.fr> | |
226 * Code added by jcdutton. | |
227 */ | |
228 if (this->position_current.still != 0) { | |
229 /* In still, but no buttons. */ | |
230 vm_get_next_cell(this->vm); | |
231 this->position_current.still = 0; | |
232 pthread_mutex_unlock(&this->vm_lock); | |
233 return S_OK; | |
234 } | |
216 pthread_mutex_unlock(&this->vm_lock); | 235 pthread_mutex_unlock(&this->vm_lock); |
217 return S_ERR; | 236 return S_ERR; |
218 } | 237 } |
219 /* FIXME: The button command should really be passed in the API instead. */ | 238 /* FIXME: The button command should really be passed in the API instead. */ |
220 button_ptr = __get_current_button(this); | 239 button_ptr = __get_current_button(this); |
243 #ifdef BUTTON_TESTING | 262 #ifdef BUTTON_TESTING |
244 fprintf(stderr,"libdvdnav: Button select %i\n", button); | 263 fprintf(stderr,"libdvdnav: Button select %i\n", button); |
245 #endif | 264 #endif |
246 | 265 |
247 /* Set the highlight SPRM if the passed button was valid*/ | 266 /* Set the highlight SPRM if the passed button was valid*/ |
267 /* FIXME: this->pci should be provided by the application. */ | |
248 if((button <= 0) || (button > this->pci.hli.hl_gi.btn_ns)) { | 268 if((button <= 0) || (button > this->pci.hli.hl_gi.btn_ns)) { |
249 printerrf("Unable to select button number %i as it doesn't exist", | 269 printerrf("Unable to select button number %i as it doesn't exist", |
250 button); | 270 button); |
251 return S_ERR; | 271 return S_ERR; |
252 } | 272 } |