From 31cf1622a7a91c2c4b4c5713ec1354063d37db17 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 25 Jun 2016 01:34:29 -0700 Subject: [PATCH] GB Video: Call finishFrame at end of vblank --- src/gb/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gb/video.c b/src/gb/video.c index cc8301527..78ae8430f 100644 --- a/src/gb/video.c +++ b/src/gb/video.c @@ -115,7 +115,6 @@ int32_t GBVideoProcessEvents(struct GBVideo* video, int32_t cycles) { video->mode = 1; --video->frameskipCounter; if (video->frameskipCounter < 0) { - video->renderer->finishFrame(video->renderer); mCoreSyncPostFrame(video->p->sync); video->frameskipCounter = video->frameskip; } @@ -154,6 +153,7 @@ int32_t GBVideoProcessEvents(struct GBVideo* video, int32_t cycles) { video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT); GBUpdateIRQs(video->p); } + video->renderer->finishFrame(video->renderer); break; } else if (video->ly == GB_VIDEO_VERTICAL_TOTAL_PIXELS) { video->p->memory.io[REG_LY] = 0;