forked from len0rd/rockbox
Fixed the font problem reported by Mark Bright, cleaning up some code in the process
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4399 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9431ae58f3
commit
8e20415b4b
1 changed files with 15 additions and 23 deletions
30
apps/tree.c
30
apps/tree.c
|
@ -234,6 +234,7 @@ static void showfileline(int line, int direntry, bool scroll, int *dirfilter)
|
||||||
{
|
{
|
||||||
char* name = dircache[direntry].name;
|
char* name = dircache[direntry].name;
|
||||||
int xpos = LINE_X;
|
int xpos = LINE_X;
|
||||||
|
char* dotpos = NULL;
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
if (!global_settings.show_icons)
|
if (!global_settings.show_icons)
|
||||||
|
@ -244,35 +245,26 @@ static void showfileline(int line, int direntry, bool scroll, int *dirfilter)
|
||||||
if (*dirfilter != SHOW_ALL &&
|
if (*dirfilter != SHOW_ALL &&
|
||||||
!(dircache[direntry].attr & ATTR_DIRECTORY))
|
!(dircache[direntry].attr & ATTR_DIRECTORY))
|
||||||
{
|
{
|
||||||
char* dotpos = strrchr(name, '.');
|
dotpos = strrchr(name, '.');
|
||||||
char temp=0;
|
|
||||||
if (dotpos) {
|
if (dotpos) {
|
||||||
temp = *dotpos;
|
|
||||||
*dotpos = 0;
|
*dotpos = 0;
|
||||||
}
|
}
|
||||||
if(scroll)
|
}
|
||||||
|
|
||||||
|
if(scroll) {
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
lcd_setfont(FONT_UI);
|
||||||
if (global_settings.invert_cursor)
|
if (global_settings.invert_cursor)
|
||||||
lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
|
lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
lcd_puts_scroll(xpos, line, name);
|
lcd_puts_scroll(xpos, line, name);
|
||||||
else
|
} else
|
||||||
lcd_puts(xpos, line, name);
|
lcd_puts(xpos, line, name);
|
||||||
if (temp)
|
|
||||||
*dotpos = temp;
|
/* Restore the dot before the extension if it was removed */
|
||||||
}
|
if (dotpos)
|
||||||
else {
|
*dotpos = '.';
|
||||||
if(scroll)
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
if (global_settings.invert_cursor)
|
|
||||||
lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
lcd_puts_scroll(xpos, line, name);
|
|
||||||
else
|
|
||||||
lcd_puts(xpos, line, name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* load sorted directory into dircache. returns NULL on failure. */
|
/* load sorted directory into dircache. returns NULL on failure. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue