From f6d159883619d099f95b771ccddaf401d1c5c846 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 15 Jan 2017 15:29:32 -0800 Subject: Fix benchmark mode --- vdp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 1b3b187..eed0392 100644 --- a/vdp.c +++ b/vdp.c @@ -112,7 +112,7 @@ void init_vdp_context(vdp_context * context, uint8_t region_pal) /* */ if (headless) { - context->output = malloc(LINEBUF_SIZE); + context->output = malloc(LINEBUF_SIZE * sizeof(uint32_t)); context->output_pitch = 0; } else { context->fb = render_get_framebuffer(FRAMEBUFFER_ODD, &context->output_pitch); @@ -1456,6 +1456,9 @@ static void vdp_advance_line(vdp_context *context) context->vcounter = 0x1D5; } if (headless) { + if (context->vcounter == context->inactive_start) { + context->frame++; + } context->vcounter &= 0x1FF; } else { if (context->vcounter == context->inactive_start) { -- cgit v1.2.3