diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-05-29 09:00:13 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-29 09:00:13 +0000 |
commit | 082ba5196db83b2eb816f787e677daf66df5b72e (patch) | |
tree | 3777928d60d704c60b4128c4f0e9cd598bfb6f83 /apps | |
parent | 349e73079e7dcde680b6a0f2fb02fa0339d6dc7a (diff) | |
download | rockbox-082ba5196db83b2eb816f787e677daf66df5b72e.tar.gz rockbox-082ba5196db83b2eb816f787e677daf66df5b72e.zip |
Don't scroll past end of file list
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@779 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/tree.c b/apps/tree.c index b0f82ce2f6..27be52bbec 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -268,15 +268,17 @@ bool dirbrowse(char *root) | |||
268 | #else | 268 | #else |
269 | case BUTTON_RIGHT: | 269 | case BUTTON_RIGHT: |
270 | #endif | 270 | #endif |
271 | if(dircursor+1 < TREE_MAX_ON_SCREEN) { | 271 | if (dircursor + start + 1 < numentries ) { |
272 | lcd_puts(0, LINE_Y+dircursor, " "); | 272 | if(dircursor+1 < TREE_MAX_ON_SCREEN) { |
273 | dircursor++; | 273 | lcd_puts(0, LINE_Y+dircursor, " "); |
274 | lcd_puts(0, LINE_Y+dircursor, "-"); | 274 | dircursor++; |
275 | } | 275 | lcd_puts(0, LINE_Y+dircursor, "-"); |
276 | else { | 276 | } |
277 | start++; | 277 | else { |
278 | numentries = showdir(currdir, start); | 278 | start++; |
279 | lcd_puts(0, LINE_Y+dircursor, "-"); | 279 | numentries = showdir(currdir, start); |
280 | lcd_puts(0, LINE_Y+dircursor, "-"); | ||
281 | } | ||
280 | } | 282 | } |
281 | break; | 283 | break; |
282 | 284 | ||