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
This commit is contained in:
Dave Chapman 2006-02-09 01:05:08 +00:00
parent 8ad2df8275
commit 8fee5282ba

View file

@ -412,6 +412,8 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
{ {
int ny, nx, ymax; int ny, nx, ymax;
const unsigned char * src_end; const unsigned char * src_end;
lcd_pixelfunc_type* fgfunc;
lcd_pixelfunc_type* bgfunc;
/* nothing to draw? */ /* nothing to draw? */
if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) 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 += stride * (src_y >> 3) + src_x; /* move starting point */
src_y &= 7; src_y &= 7;
src_end = src + width; src_end = src + width;
fgfunc = lcd_pixelfuncs[drawmode];
bgfunc = lcd_pixelfuncs[drawmode ^ DRMODE_INVERSEVID];
nx = x; nx = x;
do do
{ {
@ -452,9 +456,9 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
do do
{ {
if (data & 0x01) if (data & 0x01)
setpixel (nx,ny); fgfunc(nx,ny);
else else
clearpixel (nx,ny); bgfunc(nx,ny);
ny++; ny++;