diff options
author | Eric Linenberg <elinenbe@umich.edu> | 2002-09-04 04:21:10 +0000 |
---|---|---|
committer | Eric Linenberg <elinenbe@umich.edu> | 2002-09-04 04:21:10 +0000 |
commit | c076b27dfcbd27bda12cf53faf86e68a61663e45 (patch) | |
tree | ad4bbbf7611207cfbea30f4e21b0f01780e92232 /apps | |
parent | 228ec424a04ae64935d725c7a26b5d08ebec2af4 (diff) | |
download | rockbox-c076b27dfcbd27bda12cf53faf86e68a61663e45.tar.gz rockbox-c076b27dfcbd27bda12cf53faf86e68a61663e45.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menu.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c index cd33cf8b98..c48b444156 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -262,6 +262,18 @@ Menu menu_run(int m) | |||
262 | /* move up */ | 262 | /* move up */ |
263 | put_cursor(m, menus[m].cursor-1); | 263 | put_cursor(m, menus[m].cursor-1); |
264 | } | 264 | } |
265 | else { | ||
266 | /* move to bottom */ | ||
267 | #ifdef HAVE_RECORDER_KEYPAD | ||
268 | menus[m].top = menus[m].itemcount-9; | ||
269 | #else | ||
270 | menus[m].top = menus[m].itemcount-3; | ||
271 | #endif | ||
272 | if (menus[m].top < 0) | ||
273 | menus[m].top = 0; | ||
274 | menus[m].cursor = menus[m].itemcount-1; | ||
275 | put_cursor(m, menus[m].itemcount-1); | ||
276 | } | ||
265 | break; | 277 | break; |
266 | 278 | ||
267 | #ifdef HAVE_RECORDER_KEYPAD | 279 | #ifdef HAVE_RECORDER_KEYPAD |
@@ -275,6 +287,12 @@ Menu menu_run(int m) | |||
275 | /* move down */ | 287 | /* move down */ |
276 | put_cursor(m, menus[m].cursor+1); | 288 | put_cursor(m, menus[m].cursor+1); |
277 | } | 289 | } |
290 | else { | ||
291 | /* move to top */ | ||
292 | menus[m].top = 0; | ||
293 | menus[m].cursor = 0; | ||
294 | put_cursor(m, 0); | ||
295 | } | ||
278 | break; | 296 | break; |
279 | 297 | ||
280 | #ifdef HAVE_RECORDER_KEYPAD | 298 | #ifdef HAVE_RECORDER_KEYPAD |