From 9315282b1ecca17f3eb9c705db144820048c58f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Mon, 19 Aug 2002 12:03:02 +0000 Subject: 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 --- firmware/drivers/lcd.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'firmware/drivers') 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) -- cgit v1.2.3