From c4e021520b3d74a6d10c0a648316a96263a2f5f5 Mon Sep 17 00:00:00 2001 From: gevaerts Date: Tue, 24 Nov 2009 21:34:24 +0000 Subject: [PATCH] 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 --- apps/plugins/SOURCES | 2 ++ firmware/drivers/lcd-bitmap-common.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 4b60562af..434ef319d 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -1,3 +1,5 @@ +test_disk.c +test_gfx.c /* plugins common to all models */ chessclock.c credits.c diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 7a072894b..385391264 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -84,8 +84,8 @@ struct lcd_bitmap_char { char is_rtl; char is_diacritic; - unsigned short int width; - unsigned short base_width; + unsigned char width; + unsigned char base_width; }; /* 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); /* Mark diacritic and rtl flags for each character */ 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; /* Get proportional width and glyph bits */ -- 2.11.4.GIT