Fixed pixel setting in black and white graphics driver

replace/7aaf13b3395a497d381791bdd4abad339763f594
Silvano Seva 2020-10-22 22:00:01 +02:00 zatwierdzone przez Niccolò Izzo
rodzic 190548a0d0
commit 160b23f1b7
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -122,7 +122,8 @@ void _bw_setPixel(point_t pos, bw_t bw)
*/ */
uint16_t cell = (pos.x + pos.y*screen_width) / 8; uint16_t cell = (pos.x + pos.y*screen_width) / 8;
uint16_t elem = (pos.x + pos.y*screen_width) % 8; uint16_t elem = (pos.x + pos.y*screen_width) % 8;
buf[cell] = buf[cell] & (bw << elem); buf[cell] &= ~(1 << elem);
buf[cell] |= (bw << elem);
} }
void gfx_setPixel(point_t pos, color_t color) void gfx_setPixel(point_t pos, color_t color)