summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 9842450e9d..2098f03e4f 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -234,6 +234,7 @@ static void showfileline(int line, int direntry, bool scroll, int *dirfilter)
234{ 234{
235 char* name = dircache[direntry].name; 235 char* name = dircache[direntry].name;
236 int xpos = LINE_X; 236 int xpos = LINE_X;
237 char* dotpos = NULL;
237 238
238#ifdef HAVE_LCD_CHARCELLS 239#ifdef HAVE_LCD_CHARCELLS
239 if (!global_settings.show_icons) 240 if (!global_settings.show_icons)
@@ -244,35 +245,26 @@ static void showfileline(int line, int direntry, bool scroll, int *dirfilter)
244 if (*dirfilter != SHOW_ALL && 245 if (*dirfilter != SHOW_ALL &&
245 !(dircache[direntry].attr & ATTR_DIRECTORY)) 246 !(dircache[direntry].attr & ATTR_DIRECTORY))
246 { 247 {
247 char* dotpos = strrchr(name, '.'); 248 dotpos = strrchr(name, '.');
248 char temp=0;
249 if (dotpos) { 249 if (dotpos) {
250 temp = *dotpos;
251 *dotpos = 0; 250 *dotpos = 0;
252 } 251 }
253 if(scroll)
254#ifdef HAVE_LCD_BITMAP
255 if (global_settings.invert_cursor)
256 lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
257 else
258#endif
259 lcd_puts_scroll(xpos, line, name);
260 else
261 lcd_puts(xpos, line, name);
262 if (temp)
263 *dotpos = temp;
264 } 252 }
265 else { 253
266 if(scroll) 254 if(scroll) {
267#ifdef HAVE_LCD_BITMAP 255#ifdef HAVE_LCD_BITMAP
268 if (global_settings.invert_cursor) 256 lcd_setfont(FONT_UI);
269 lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); 257 if (global_settings.invert_cursor)
270 else 258 lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
271#endif
272 lcd_puts_scroll(xpos, line, name);
273 else 259 else
274 lcd_puts(xpos, line, name); 260#endif
275 } 261 lcd_puts_scroll(xpos, line, name);
262 } else
263 lcd_puts(xpos, line, name);
264
265 /* Restore the dot before the extension if it was removed */
266 if (dotpos)
267 *dotpos = '.';
276} 268}
277 269
278/* load sorted directory into dircache. returns NULL on failure. */ 270/* load sorted directory into dircache. returns NULL on failure. */