all repos — mgba @ ff0b7af48b701112e007e5e66835c4ee9cf5c8ec

mGBA Game Boy Advance Emulator

GBA: Add timing fudge factor for running a frame
Vicki Pfau vi@endrift.com
Sun, 07 Jun 2020 20:32:38 -0700
commit

ff0b7af48b701112e007e5e66835c4ee9cf5c8ec

parent

b4a8df053f6cd1924d68e40fc29d328da4bf1b04

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/core.csrc/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); } }