diff --git a/CHANGES b/CHANGES index b43829bff..8dbd53256 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ Other fixes: - Core: Fix crash modifying hash table entry (fixes mgba.io/i/1673) - GB Video: Fix some cases where SGB border doesn't draw to mutli-buffers - GBA: Reject incorrectly sized BIOSes + - GBA: Break infinite loop for 0-frame mVLs (fixes mgba.io/i/1723) - Qt: Fix OpenGL 2.1 support (fixes mgba.io/i/1678) - Qt: Fix unmapping zipped ROM (fixes mgba.io/i/1777) Misc: diff --git a/src/gba/core.c b/src/gba/core.c index 9ab988352..79465d1b8 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -616,7 +616,8 @@ static void _GBACoreReset(struct mCore* core) { static void _GBACoreRunFrame(struct mCore* core) { struct GBA* gba = core->board; int32_t frameCounter = gba->video.frameCounter; - while (gba->video.frameCounter == frameCounter) { + uint32_t startCycle = mTimingCurrentTime(&gba->timing); + while (gba->video.frameCounter == frameCounter && mTimingCurrentTime(&gba->timing) - startCycle < VIDEO_TOTAL_LENGTH) { ARMRunLoop(core->cpu); } }