1
0
Fork 0
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:
Linus Nielsen Feltzing 2004-03-17 14:46:06 +00:00
parent 9431ae58f3
commit 8e20415b4b

View file

@ -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)
#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);
if (temp)
*dotpos = temp;
} }
else {
if(scroll) if(scroll) {
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
if (global_settings.invert_cursor) lcd_setfont(FONT_UI);
lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT); if (global_settings.invert_cursor)
else lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
#endif
lcd_puts_scroll(xpos, line, name);
else else
lcd_puts(xpos, line, name); #endif
} lcd_puts_scroll(xpos, line, name);
} else
lcd_puts(xpos, line, name);
/* Restore the dot before the extension if it was removed */
if (dotpos)
*dotpos = '.';
} }
/* load sorted directory into dircache. returns NULL on failure. */ /* load sorted directory into dircache. returns NULL on failure. */