diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-05-29 08:18:46 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-29 08:18:46 +0000 |
| commit | f03d691af1d62bdaf7997e832354759ecd5f241c (patch) | |
| tree | 4267beba4edf09d15cd9eb8624f82abf0e5e4d83 | |
| parent | af87be05144342834df0532202a640ea2ce3706a (diff) | |
| download | rockbox-f03d691af1d62bdaf7997e832354759ecd5f241c.zip rockbox-f03d691af1d62bdaf7997e832354759ecd5f241c.tar.gz rockbox-f03d691af1d62bdaf7997e832354759ecd5f241c.tar.bz2 rockbox-f03d691af1d62bdaf7997e832354759ecd5f241c.tar.xz | |
Fixed bad display on recorder
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@774 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/tree.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c index c2d9b21..b0f82ce 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -116,15 +116,20 @@ static int showdir(char *path, int start) #endif for ( i=start; i < start+TREE_MAX_ON_SCREEN; i++ ) { - int len = strlen(buffer[i].name); + int len; + + if ( i >= filesindir ) + break; + + len = strlen(buffer[i].name); #ifdef HAVE_LCD_BITMAP if ( buffer[i].file ) icon_type=File; else icon_type=Folder; - lcd_bitmap(bitmap_icons_6x8[icon_type], 6, MARGIN_Y+i*LINE_HEIGTH, 6, - 8, true); + lcd_bitmap(bitmap_icons_6x8[icon_type], + 6, MARGIN_Y+(i-start)*LINE_HEIGTH, 6, 8, true); #endif if(len < TREE_MAX_LEN_DISPLAY) @@ -273,7 +278,6 @@ bool dirbrowse(char *root) numentries = showdir(currdir, start); lcd_puts(0, LINE_Y+dircursor, "-"); } - debugf("s:%d d:%d\n",start,dircursor); break; #ifdef HAVE_RECORDER_KEYPAD |