aboutsummaryrefslogtreecommitdiff
path: root/src/ppusim/sim.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-02-25 14:59:20 +0100
committerlonkaars <loek@pipeframe.xyz>2023-02-25 14:59:20 +0100
commit0e6f7148ab0987574c45e78cb8fd6ff72fdf103a (patch)
tree2ccc32a6708e079db94cab4911eb10f912756af3 /src/ppusim/sim.c
parent5850f4ab766256791f72301349e30d4cd304c675 (diff)
optimize ppusim with threads
Diffstat (limited to 'src/ppusim/sim.c')
-rw-r--r--src/ppusim/sim.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c
index 8f01359..4226a9b 100644
--- a/src/ppusim/sim.c
+++ b/src/ppusim/sim.c
@@ -7,7 +7,7 @@
#include "ppu/ppu.h"
#include "ppusim/mem.h"
#include "ppusim/sim.h"
-#include "ppusim/pixel.h"
+#include "ppusim/work.h"
SDL_Window *g_hh_window = NULL;
SDL_Renderer *g_hh_renderer = NULL;
@@ -38,11 +38,7 @@ void hh_loop() {
hh_ppu_vblank_interrupt();
SDL_RenderClear(g_hh_renderer);
-
- for (unsigned x = 0; x < HH_PPU_SCREEN_WIDTH; x++)
- for (unsigned y = 0; y < HH_PPU_SCREEN_HEIGHT; y++)
- hh_ppusim_pixel(g_hh_renderer, x, y);
-
+ hh_ppusim_draw_frame(g_hh_renderer);
SDL_SetRenderDrawColor(g_hh_renderer, 0, 0, 0, 255);
SDL_RenderPresent(g_hh_renderer);