diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-08-19 12:03:02 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-08-19 12:03:02 +0000 |
commit | 9315282b1ecca17f3eb9c705db144820048c58f4 (patch) | |
tree | 1c3f75813a6e266d146f7846aad8dc6bc109a103 /firmware/drivers | |
parent | 111597ba0266434f38dad0096823fb07da031df5 (diff) |
Fall back to fixed font if loadable font is not present
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1801 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index 1c2ecb22a3..2d095f2a5f 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c @@ -879,17 +879,14 @@ void lcd_puts(int x, int y, unsigned char *str) } +/* + * Put a string at specified bit position + */ void lcd_putsxy(int x, int y, unsigned char *str, int thisfont) { -#ifdef LOADABLE_FONTS - lcd_putsldfxy(x,y,str); - (void)thisfont; -#elif LCD_PROPFONTS +#ifdef LCD_PROPFONTS lcd_putspropxy(x,y,str,thisfont); #else -/* - * Put a string at specified bit position - */ int nx = fonts[thisfont]; int ny = fontheight[thisfont]; @@ -898,6 +895,13 @@ void lcd_putsxy(int x, int y, unsigned char *str, int thisfont) int lcd_x = x; int lcd_y = y; +#ifdef LOADABLE_FONTS + if ( _font ) { + lcd_putsldfxy(x,y,str); + return; + } +#endif + while (((ch = *str++) != '\0') && (lcd_x + nx < LCD_WIDTH)) { if (lcd_y + ny > LCD_HEIGHT) |