summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-02 18:03:00 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-02 18:03:00 +0000
commitdad6d76ef2de65097de94aa97dc0069b7ec59b3e (patch)
treee9c63b43f24c2b74e6bec85fc0b0320bef9828e5 /apps
parent71ef31a2a9280b4cb70403ddf31409a371a55423 (diff)
downloadrockbox-dad6d76ef2de65097de94aa97dc0069b7ec59b3e.zip
rockbox-dad6d76ef2de65097de94aa97dc0069b7ec59b3e.tar.gz
rockbox-dad6d76ef2de65097de94aa97dc0069b7ec59b3e.tar.bz2
rockbox-dad6d76ef2de65097de94aa97dc0069b7ec59b3e.tar.xz
Wrapping patch by Bill, Matthew and Lee
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1311 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index a6308b4..cef63a0 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -358,7 +358,6 @@ bool dirbrowse(char *root)
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, false);
dircursor--;
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- lcd_update();
}
else {
if (start) {
@@ -366,7 +365,21 @@ bool dirbrowse(char *root)
numentries = showdir(currdir, start);
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
}
+ else {
+ if (numentries < TREE_MAX_ON_SCREEN) {
+ put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, false);
+ dircursor = numentries - 1;
+ put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
+ }
+ else {
+ start = numentries - TREE_MAX_ON_SCREEN;
+ dircursor = TREE_MAX_ON_SCREEN - 1;
+ numentries = showdir(currdir, start);
+ put_cursorxy(0, CURSOR_Y + LINE_Y + TREE_MAX_ON_SCREEN - 1, true);
+ }
+ }
}
+ lcd_update();
break;
case TREE_NEXT:
@@ -382,6 +395,19 @@ bool dirbrowse(char *root)
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
}
}
+ else {
+ if(numentries < TREE_MAX_ON_SCREEN) {
+ put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, false);
+ start = dircursor = 0;
+ put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
+ }
+ else {
+ start = dircursor = 0;
+ numentries = showdir(currdir, start);
+ put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
+ }
+ }
+ lcd_update();
break;
case TREE_MENU: {