[MPlayer-cvslog] CVS: main/libmenu menu_list.c,1.7,1.8
Alban Bedel CVS
syncmail at mplayerhq.hu
Mon Mar 27 21:27:44 CEST 2006
CVS change done by Alban Bedel CVS
Update of /cvsroot/mplayer/main/libmenu
In directory mail:/var2/tmp/cvs-serv22240/libmenu
Modified Files:
menu_list.c
Log Message:
Fix cycling in menu with hidden items.
Thanks again to Jonas Jermann for the report.
Index: menu_list.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmenu/menu_list.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- menu_list.c 25 Mar 2006 18:15:37 -0000 1.7
+++ menu_list.c 27 Mar 2006 19:27:42 -0000 1.8
@@ -135,21 +135,25 @@
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;
More information about the MPlayer-cvslog
mailing list