summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 7bb473f28e..01580e7104 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -154,14 +154,7 @@ static int showdir(char *path, int start)
154 6, MARGIN_Y+(i-start)*LINE_HEIGTH, 6, 8, true); 154 6, MARGIN_Y+(i-start)*LINE_HEIGTH, 6, 8, true);
155#endif 155#endif
156 156
157 if(len < TREE_MAX_LEN_DISPLAY) 157 lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name);
158 lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name);
159 else {
160 char storage = dircacheptr[i]->name[TREE_MAX_LEN_DISPLAY];
161 dircacheptr[i]->name[TREE_MAX_LEN_DISPLAY]=0;
162 lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name);
163 dircacheptr[i]->name[TREE_MAX_LEN_DISPLAY]=storage;
164 }
165 } 158 }
166 159
167 return filesindir; 160 return filesindir;
@@ -235,6 +228,8 @@ bool dirbrowse(char *root)
235 return -1; /* root is not a directory */ 228 return -1; /* root is not a directory */
236 229
237 lcd_puts(0, dircursor, CURSOR_CHAR); 230 lcd_puts(0, dircursor, CURSOR_CHAR);
231 lcd_puts_scroll(LINE_X, LINE_Y+dircursor,
232 dircacheptr[start+dircursor]->name);
238#ifdef HAVE_LCD_BITMAP 233#ifdef HAVE_LCD_BITMAP
239 lcd_update(); 234 lcd_update();
240#endif 235#endif
@@ -298,8 +293,8 @@ bool dirbrowse(char *root)
298 dircursor=0; 293 dircursor=0;
299 start=0; 294 start=0;
300 } else { 295 } else {
301 int len= 296 int len=strlen(dircacheptr[dircursor+start]->name);
302 strlen(dircacheptr[dircursor+start]->name); 297 lcd_stop_scroll();
303 if((len > 4) && 298 if((len > 4) &&
304 !strcmp(&dircacheptr[dircursor+start]->name[len-4], 299 !strcmp(&dircacheptr[dircursor+start]->name[len-4],
305 ".m3u")) { 300 ".m3u")) {
@@ -369,6 +364,7 @@ bool dirbrowse(char *root)
369#else 364#else
370 case BUTTON_MENU: 365 case BUTTON_MENU:
371#endif 366#endif
367 lcd_stop_scroll();
372 main_menu(); 368 main_menu();
373 369
374 /* restore display */ 370 /* restore display */
@@ -384,6 +380,11 @@ bool dirbrowse(char *root)
384 380
385 break; 381 break;
386 } 382 }
383
384 lcd_stop_scroll();
385 lcd_puts_scroll(LINE_X, LINE_Y+dircursor,
386 dircacheptr[start+dircursor]->name);
387
387 lcd_update(); 388 lcd_update();
388 } 389 }
389 390