all repos — mgba @ 48a6bd47ceff7be7152cce427b91fde2f257e0af

mGBA Game Boy Advance Emulator

GB, GBA: Fix sync to video with frameskip
Vicki Pfau vi@endrift.com
Sun, 03 Sep 2017 22:15:48 -0700
commit

48a6bd47ceff7be7152cce427b91fde2f257e0af

parent

10b14f90d136881c6cf94d67cd809b767a8bde88

3 files changed, 3 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -34,6 +34,7 @@ - GB Video: Fix potential hang when ending mode 0

- GB Memory: Fix HDMA count starting in mode 0 (fixes mgba.io/i/855) - GB Memory: Actually load latch time from savestate - GB Serialize: Fix game title check + - GB, GBA: Fix sync to video with frameskip Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M src/gb/video.csrc/gb/video.c

@@ -338,10 +338,10 @@ }

} GBFrameEnded(video->p); + mCoreSyncPostFrame(video->p->sync); --video->frameskipCounter; if (video->frameskipCounter < 0) { video->renderer->finishFrame(video->renderer); - mCoreSyncPostFrame(video->p->sync); video->frameskipCounter = video->frameskip; } ++video->frameCounter;
M src/gba/video.csrc/gba/video.c

@@ -157,9 +157,9 @@ if (GBARegisterDISPSTATIsVblankIRQ(dispstat)) {

GBARaiseIRQ(video->p, IRQ_VBLANK); } GBAFrameEnded(video->p); + mCoreSyncPostFrame(video->p->sync); --video->frameskipCounter; if (video->frameskipCounter < 0) { - mCoreSyncPostFrame(video->p->sync); video->frameskipCounter = video->frameskip; } ++video->frameCounter;