summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Linenberg <elinenbe@umich.edu>2002-09-04 04:21:10 +0000
committerEric Linenberg <elinenbe@umich.edu>2002-09-04 04:21:10 +0000
commitc076b27dfcbd27bda12cf53faf86e68a61663e45 (patch)
treead4bbbf7611207cfbea30f4e21b0f01780e92232
parent228ec424a04ae64935d725c7a26b5d08ebec2af4 (diff)
downloadrockbox-c076b27dfcbd27bda12cf53faf86e68a61663e45.zip
rockbox-c076b27dfcbd27bda12cf53faf86e68a61663e45.tar.gz
rockbox-c076b27dfcbd27bda12cf53faf86e68a61663e45.tar.bz2
rockbox-c076b27dfcbd27bda12cf53faf86e68a61663e45.tar.xz
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
-rw-r--r--apps/menu.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c
index cd33cf8..c48b444 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -262,6 +262,18 @@ Menu menu_run(int m)
/* move up */
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;
#ifdef HAVE_RECORDER_KEYPAD
@@ -275,6 +287,12 @@ Menu menu_run(int m)
/* move down */
put_cursor(m, menus[m].cursor+1);
}
+ else {
+ /* move to top */
+ menus[m].top = 0;
+ menus[m].cursor = 0;
+ put_cursor(m, 0);
+ }
break;
#ifdef HAVE_RECORDER_KEYPAD