1
0
Fork 0
forked from len0rd/rockbox

Limit character width to 255 pixels

Use intermediate variable to fix yellow and red



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23744 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2009-11-24 21:34:24 +00:00
parent a68ad9e521
commit 75ce9606a1
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,5 @@
test_disk.c
test_gfx.c
/* plugins common to all models */ /* plugins common to all models */
chessclock.c chessclock.c
credits.c credits.c

View file

@ -84,8 +84,8 @@ struct lcd_bitmap_char
{ {
char is_rtl; char is_rtl;
char is_diacritic; char is_diacritic;
unsigned short int width; unsigned char width;
unsigned short base_width; unsigned char base_width;
}; };
/* put a string at a given pixel position, skipping first ofs pixel columns */ /* put a string at a given pixel position, skipping first ofs pixel columns */
@ -120,7 +120,11 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
ucs = bidi_l2v(str, 1); ucs = bidi_l2v(str, 1);
/* Mark diacritic and rtl flags for each character */ /* Mark diacritic and rtl flags for each character */
for (i = 0; i < SCROLL_LINE_SIZE && ucs[i]; i++) for (i = 0; i < SCROLL_LINE_SIZE && ucs[i]; i++)
chars[i].is_diacritic = is_diacritic(ucs[i], &chars[i].is_rtl); {
bool is_rtl;
chars[i].is_diacritic = is_diacritic(ucs[i], &is_rtl);
chars[i].is_rtl=is_rtl;
}
len = i; len = i;
/* Get proportional width and glyph bits */ /* Get proportional width and glyph bits */