forked from len0rd/rockbox
Don't scroll past end of file list
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@779 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
349e73079e
commit
082ba5196d
1 changed files with 11 additions and 9 deletions
20
apps/tree.c
20
apps/tree.c
|
@ -268,15 +268,17 @@ bool dirbrowse(char *root)
|
|||
#else
|
||||
case BUTTON_RIGHT:
|
||||
#endif
|
||||
if(dircursor+1 < TREE_MAX_ON_SCREEN) {
|
||||
lcd_puts(0, LINE_Y+dircursor, " ");
|
||||
dircursor++;
|
||||
lcd_puts(0, LINE_Y+dircursor, "-");
|
||||
}
|
||||
else {
|
||||
start++;
|
||||
numentries = showdir(currdir, start);
|
||||
lcd_puts(0, LINE_Y+dircursor, "-");
|
||||
if (dircursor + start + 1 < numentries ) {
|
||||
if(dircursor+1 < TREE_MAX_ON_SCREEN) {
|
||||
lcd_puts(0, LINE_Y+dircursor, " ");
|
||||
dircursor++;
|
||||
lcd_puts(0, LINE_Y+dircursor, "-");
|
||||
}
|
||||
else {
|
||||
start++;
|
||||
numentries = showdir(currdir, start);
|
||||
lcd_puts(0, LINE_Y+dircursor, "-");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue