16 bit lcd_mono_bitmap
'Bugfix' mono_bitmap_part reads ahead in the buffer, if the height is <= char bit pixels other memory gets read Change-Id: I6e0d7a9017e1f9c371ffbd56af149ac20cb82341
This commit is contained in:
parent
afe80742a5
commit
85fbbd9c7f
1 changed files with 8 additions and 1 deletions
|
@ -462,7 +462,14 @@ void ICODE_ATTR lcd_mono_bitmap_part(const unsigned char *src, int src_x,
|
|||
/* Draw a full monochrome bitmap */
|
||||
void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height)
|
||||
{
|
||||
lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height);
|
||||
int stride = width;
|
||||
|
||||
/* 'Bugfix' mono_bitmap_part reads ahead in the buffer,
|
||||
* if the height is <= char bit pixels other memory gets read
|
||||
*/
|
||||
if (height <= CHAR_BIT)
|
||||
stride = 0;
|
||||
lcd_mono_bitmap_part(src, 0, 0, stride, x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue