summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/lcd-16bit-common.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c
index 49e515f59f..5ec142c855 100644
--- a/firmware/drivers/lcd-16bit-common.c
+++ b/firmware/drivers/lcd-16bit-common.c
@@ -462,7 +462,14 @@ void ICODE_ATTR lcd_mono_bitmap_part(const unsigned char *src, int src_x,
462/* Draw a full monochrome bitmap */ 462/* Draw a full monochrome bitmap */
463void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height) 463void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height)
464{ 464{
465 lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height); 465 int stride = width;
466
467 /* 'Bugfix' mono_bitmap_part reads ahead in the buffer,
468 * if the height is <= char bit pixels other memory gets read
469 */
470 if (height <= CHAR_BIT)
471 stride = 0;
472 lcd_mono_bitmap_part(src, 0, 0, stride, x, y, width, height);
466} 473}
467 474
468 475