mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Fix cycling in menu with hidden items.
Thanks again to Jonas Jermann for the report. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17981 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
03d71f6817
commit
3db345c707
@ -135,21 +135,25 @@ void menu_list_draw(menu_t* menu,mp_image_t* mpi) {
|
||||
void menu_list_read_cmd(menu_t* menu,int cmd) {
|
||||
switch(cmd) {
|
||||
case MENU_CMD_UP:
|
||||
if(!mpriv->current->prev) {
|
||||
for( ; mpriv->current->next != NULL ; mpriv->current = mpriv->current->next)
|
||||
/* NOTHING */;
|
||||
while(mpriv->current->prev) {
|
||||
mpriv->current = mpriv->current->prev;
|
||||
if(!mpriv->current->hide) return;
|
||||
}
|
||||
for( ; mpriv->current->next != NULL ; mpriv->current = mpriv->current->next)
|
||||
/* NOTHING */;
|
||||
if(!mpriv->current->hide) return;
|
||||
while(mpriv->current->prev) {
|
||||
mpriv->current = mpriv->current->prev;
|
||||
if(!mpriv->current->hide) return;
|
||||
}
|
||||
break;
|
||||
case MENU_CMD_DOWN:
|
||||
if(!mpriv->current->next) {
|
||||
mpriv->current = mpriv->menu;
|
||||
while(mpriv->current->next) {
|
||||
mpriv->current = mpriv->current->next;
|
||||
if(!mpriv->current->hide) return;
|
||||
}
|
||||
mpriv->current = mpriv->menu;
|
||||
if(!mpriv->current->hide) return;
|
||||
while(mpriv->current->next) {
|
||||
mpriv->current = mpriv->current->next;
|
||||
if(!mpriv->current->hide) return;
|
||||
|
Loading…
Reference in New Issue
Block a user