forked from len0rd/rockbox
Added menu wrap. It works on the recorder, but I can't test on the player... hopefully it plays okay!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2165 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
228ec424a0
commit
c076b27dfc
1 changed files with 18 additions and 0 deletions
18
apps/menu.c
18
apps/menu.c
|
@ -262,6 +262,18 @@ Menu menu_run(int m)
|
||||||
/* move up */
|
/* move up */
|
||||||
put_cursor(m, menus[m].cursor-1);
|
put_cursor(m, menus[m].cursor-1);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* move to bottom */
|
||||||
|
#ifdef HAVE_RECORDER_KEYPAD
|
||||||
|
menus[m].top = menus[m].itemcount-9;
|
||||||
|
#else
|
||||||
|
menus[m].top = menus[m].itemcount-3;
|
||||||
|
#endif
|
||||||
|
if (menus[m].top < 0)
|
||||||
|
menus[m].top = 0;
|
||||||
|
menus[m].cursor = menus[m].itemcount-1;
|
||||||
|
put_cursor(m, menus[m].itemcount-1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef HAVE_RECORDER_KEYPAD
|
#ifdef HAVE_RECORDER_KEYPAD
|
||||||
|
@ -275,6 +287,12 @@ Menu menu_run(int m)
|
||||||
/* move down */
|
/* move down */
|
||||||
put_cursor(m, menus[m].cursor+1);
|
put_cursor(m, menus[m].cursor+1);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* move to top */
|
||||||
|
menus[m].top = 0;
|
||||||
|
menus[m].cursor = 0;
|
||||||
|
put_cursor(m, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef HAVE_RECORDER_KEYPAD
|
#ifdef HAVE_RECORDER_KEYPAD
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue