Mercurial > libdvdnav.hg
diff searching.c @ 162:0fd70a257b44 src
Implement ESCAPE key jumping from TITLE to MENU and back again.
author | jcdutton |
---|---|
date | Sun, 06 Apr 2003 16:56:22 +0000 |
parents | 5897ff629f7c |
children | 5d8955d7a01a |
line wrap: on
line diff
--- a/searching.c Sun Apr 06 13:05:45 2003 +0000 +++ b/searching.c Sun Apr 06 16:56:22 2003 +0000 @@ -357,6 +357,20 @@ /* make a copy of current VM and try to navigate the copy to the menu */ try_vm = vm_new_copy(this->vm); + if ( (menu == DVD_MENU_Escape) && (this->vm->state.domain != VTS_DOMAIN)) { + /* Try resume */ + if (!try_vm->stopped && vm_resume(try_vm)) { + /* merge changes on success */ + vm_merge(this->vm, try_vm); + vm_free_copy(try_vm); + this->position_current.still = 0; + this->vm->hop_channel++; + pthread_mutex_unlock(&this->vm_lock); + return S_OK; + } + } + if (menu == DVD_MENU_Escape) menu = DVD_MENU_Title; + if (vm_jump_menu(try_vm, menu) && !try_vm->stopped) { /* merge changes on success */ vm_merge(this->vm, try_vm);