forked from len0rd/rockbox
The recorder's lcd_putsxy() will now output '?' instead of just skipping
unknown characters. I think we will need a rather full ISO-8859-1 character set. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@809 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dd0785273f
commit
7ec047c3a4
1 changed files with 16 additions and 12 deletions
|
|
@ -501,20 +501,24 @@ void lcd_putsxy(int x, int y, char *str, int thisfont)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Limit to char generation table */
|
/* Limit to char generation table */
|
||||||
if (ch >= ASCII_MIN && ch <= ASCII_MAX)
|
if ((ch < ASCII_MIN) || (ch > ASCII_MAX))
|
||||||
{
|
/* replace unsupported letters with question marks */
|
||||||
if (nx == 12)
|
ch = '?' - ASCII_MIN;
|
||||||
src = char_gen_12x16[ch-ASCII_MIN][0];
|
else
|
||||||
else if (nx == 8)
|
ch -= ASCII_MIN;
|
||||||
src = char_gen_8x12[ch-ASCII_MIN][0];
|
|
||||||
else
|
if (thisfont == 2)
|
||||||
src = char_gen_6x8[ch-ASCII_MIN][0];
|
src = char_gen_12x16[ch][0];
|
||||||
|
else if (thisfont == 1)
|
||||||
|
src = char_gen_8x12[ch][0];
|
||||||
|
else
|
||||||
|
src = char_gen_6x8[ch][0];
|
||||||
|
|
||||||
|
lcd_bitmap (src, lcd_x, lcd_y, nx-1, ny, true);
|
||||||
|
lcd_bitmap (zeros, lcd_x+nx-1, lcd_y, 1, ny, true);
|
||||||
|
|
||||||
lcd_bitmap (src, lcd_x, lcd_y, nx-1, ny, true);
|
lcd_x += nx;
|
||||||
lcd_bitmap (zeros, lcd_x+nx-1, lcd_y, 1, ny, true);
|
|
||||||
|
|
||||||
lcd_x += nx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue