GBA: Add timing fudge factor for running a frame

This commit is contained in:
Vicki Pfau 2020-06-07 20:32:38 -07:00
parent b4a8df053f
commit ff0b7af48b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}