diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 10 |
1 files 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, | |||
412 | { | 412 | { |
413 | int ny, nx, ymax; | 413 | int ny, nx, ymax; |
414 | const unsigned char * src_end; | 414 | const unsigned char * src_end; |
415 | lcd_pixelfunc_type* fgfunc; | ||
416 | lcd_pixelfunc_type* bgfunc; | ||
415 | 417 | ||
416 | /* nothing to draw? */ | 418 | /* nothing to draw? */ |
417 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | 419 | 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, | |||
439 | src += stride * (src_y >> 3) + src_x; /* move starting point */ | 441 | src += stride * (src_y >> 3) + src_x; /* move starting point */ |
440 | src_y &= 7; | 442 | src_y &= 7; |
441 | src_end = src + width; | 443 | src_end = src + width; |
442 | 444 | ||
445 | fgfunc = lcd_pixelfuncs[drawmode]; | ||
446 | bgfunc = lcd_pixelfuncs[drawmode ^ DRMODE_INVERSEVID]; | ||
443 | nx = x; | 447 | nx = x; |
444 | do | 448 | do |
445 | { | 449 | { |
@@ -452,9 +456,9 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
452 | do | 456 | do |
453 | { | 457 | { |
454 | if (data & 0x01) | 458 | if (data & 0x01) |
455 | setpixel (nx,ny); | 459 | fgfunc(nx,ny); |
456 | else | 460 | else |
457 | clearpixel (nx,ny); | 461 | bgfunc(nx,ny); |
458 | 462 | ||
459 | ny++; | 463 | ny++; |
460 | 464 | ||