From 8fee5282bad592d33e623bf7dba3de7fee992363 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Thu, 9 Feb 2006 01:05:08 +0000 Subject: [PATCH] iPod grayscale LCD driver - fix bug preventing the inverse bar line selector from displaying git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8637 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-2bit-horz.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index c4df5e8abf..fd6be0be05 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c @@ -412,6 +412,8 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, { int ny, nx, ymax; const unsigned char * src_end; + lcd_pixelfunc_type* fgfunc; + lcd_pixelfunc_type* bgfunc; /* nothing to draw? */ if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) @@ -439,7 +441,9 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, src += stride * (src_y >> 3) + src_x; /* move starting point */ src_y &= 7; src_end = src + width; - + + fgfunc = lcd_pixelfuncs[drawmode]; + bgfunc = lcd_pixelfuncs[drawmode ^ DRMODE_INVERSEVID]; nx = x; do { @@ -452,9 +456,9 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, do { if (data & 0x01) - setpixel (nx,ny); + fgfunc(nx,ny); else - clearpixel (nx,ny); + bgfunc(nx,ny); ny++;