changeset 1168:fa73a77ddf92

Fix benchmark mode
author Michael Pavone <pavone@retrodev.com>
date Sun, 15 Jan 2017 15:29:32 -0800
parents e758ddbf0624
children 82d8b9324b10
files vdp.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Sun Jan 15 15:07:24 2017 -0800
+++ b/vdp.c	Sun Jan 15 15:29:32 2017 -0800
@@ -112,7 +112,7 @@
 	/*
 	*/
 	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 @@
 		context->vcounter = 0x1D5;
 	}
 	if (headless) {
+		if (context->vcounter == context->inactive_start) {
+			context->frame++;
+		}
 		context->vcounter &= 0x1FF;
 	} else {
 		if (context->vcounter == context->inactive_start) {