summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-30 06:49:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-30 06:49:39 +0000
commit7ec047c3a404320ef40ca5812ae5e542e35f0cc2 (patch)
tree2fdb6dfffc28c49efe22e96b559eed776ce01e73
parentdd0785273f72594bc1a9d642f5454f39a6eb21eb (diff)
downloadrockbox-7ec047c3a404320ef40ca5812ae5e542e35f0cc2.zip
rockbox-7ec047c3a404320ef40ca5812ae5e542e35f0cc2.tar.gz
rockbox-7ec047c3a404320ef40ca5812ae5e542e35f0cc2.tar.bz2
rockbox-7ec047c3a404320ef40ca5812ae5e542e35f0cc2.tar.xz
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
-rw-r--r--firmware/drivers/lcd.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index 7d53021..2136291 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -501,20 +501,24 @@ void lcd_putsxy(int x, int y, char *str, int thisfont)
return;
/* Limit to char generation table */
- if (ch >= ASCII_MIN && ch <= ASCII_MAX)
- {
- if (nx == 12)
- src = char_gen_12x16[ch-ASCII_MIN][0];
- else if (nx == 8)
- src = char_gen_8x12[ch-ASCII_MIN][0];
- else
- src = char_gen_6x8[ch-ASCII_MIN][0];
+ if ((ch < ASCII_MIN) || (ch > ASCII_MAX))
+ /* replace unsupported letters with question marks */
+ ch = '?' - ASCII_MIN;
+ else
+ ch -= ASCII_MIN;
+
+ if (thisfont == 2)
+ 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_bitmap (zeros, lcd_x+nx-1, lcd_y, 1, ny, true);
+ lcd_x += nx;
- lcd_x += nx;
- }
}
}