Multithread gui, remove hard coded cpu->pc
diff --git a/screen.c b/screen.c
index 4b01adc..7d09daf 100644
--- a/screen.c
+++ b/screen.c
@@ -26,18 +26,20 @@
if (!state)
return;
- //nk_fill_rect(out, bounds, 0, nk_rgb(255, 0, 0));
+ nk_fill_rect(out, bounds, 0, nk_rgb(0, 0, 0));
- //return;
for (int i = 0; i < CPU_FB_H; i++)
{
for (int j = 0; j < CPU_FB_W; j++)
{
- nk_fill_rect(out,
- nk_rect(bounds.x + i * size, bounds.y + j * size,
- size, size), 0.0f,
- byte_to_color(mem[i + CPU_FB_H * j]));
+ if (mem[i + CPU_FB_H * j])
+ {
+ nk_fill_rect(out,
+ nk_rect(bounds.x + i * size, bounds.y + j * size,
+ size, size), 0.0f,
+ byte_to_color(mem[i + CPU_FB_H * j]));
+ }
}
}
}