From ff0b7af48b701112e007e5e66835c4ee9cf5c8ec Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 7 Jun 2020 20:32:38 -0700 Subject: [PATCH] GBA: Add timing fudge factor for running a frame --- src/gba/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/core.c b/src/gba/core.c index 224d03f76..c134e5d45 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -644,7 +644,7 @@ static void _GBACoreRunFrame(struct mCore* core) { struct GBA* gba = core->board; int32_t frameCounter = gba->video.frameCounter; uint32_t startCycle = mTimingCurrentTime(&gba->timing); - while (gba->video.frameCounter == frameCounter && mTimingCurrentTime(&gba->timing) - startCycle < VIDEO_TOTAL_LENGTH) { + while (gba->video.frameCounter == frameCounter && mTimingCurrentTime(&gba->timing) - startCycle < VIDEO_TOTAL_LENGTH + VIDEO_HORIZONTAL_LENGTH) { ARMRunLoop(core->cpu); } }