From 7aeb6363927b2c17c0ec9c5fccec5d097ecf1244 Mon Sep 17 00:00:00 2001 From: Ry Date: Sun, 23 Oct 2022 16:51:03 -0700 Subject: [PATCH] Read the correct byte for the overlay alpha channel --- src/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framebuffer.c b/src/framebuffer.c index f29d9a2..68d1332 100644 --- a/src/framebuffer.c +++ b/src/framebuffer.c @@ -48,7 +48,7 @@ void draw_framebuffer(struct Screen *screen) { for (size_t x = xmin; x < xmax; x++) { size_t index_dst = (x + y * FRAMEBUFFER_WIDTH) * 4; size_t index_src = ((x - xmin) + (y - ymin) * width) * 4 + pointer; - if (vm.memory_ram[index_src] > 0) { + if (vm.memory_ram[index_src + 3] > 0) { memcpy(&framebuffer[index_dst], &vm.memory_ram[index_src], 4); } }