Skip to content

Commit a181423

Browse files
committed
nicer looking skin for st7789v
1 parent 32c91e7 commit a181423

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

hw/display/st7789v.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,12 @@ static void draw_skin(ConsoleState *c) {
126126
for (int i = 0; i < board_skin->height; i++)
127127
for (int j = 0; j < board_skin->width; j++) {
128128
pixel p = board_skin->pixel_data[i * board_skin->width + j];
129+
p.r=(p.r*p.a)/255;
130+
p.g=(p.g*p.a)/255;
131+
p.b=(p.b*p.a)/255;
129132
uint32_t rgba= (p.a<<24) | (p.r<<16) | (p.g<<8) | p.b;
130-
if (p.a < 200)
131-
rgba=0xff000000;
133+
// if (p.a < 200)
134+
// rgba=0xff000000;
132135
uint16_t rgb565=argbto565(rgba);
133136
if (c->width < c->height) // portrait
134137
dest[i * board_skin->width + j] = rgb565;

0 commit comments

Comments
 (0)