Read the correct byte for the overlay alpha channel

This commit is contained in:
Ry 2022-10-23 16:51:03 -07:00
parent 53cbc0d96c
commit 7aeb636392

View File

@ -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);
}
}