mirror of https://github.com/mgba-emu/mgba.git
GB, GBA: Fix sync to video with frameskip
This commit is contained in:
parent
10b14f90d1
commit
48a6bd47ce
1
CHANGES
1
CHANGES
|
@ -34,6 +34,7 @@ Bugfixes:
|
||||||
- GB Memory: Fix HDMA count starting in mode 0 (fixes mgba.io/i/855)
|
- GB Memory: Fix HDMA count starting in mode 0 (fixes mgba.io/i/855)
|
||||||
- GB Memory: Actually load latch time from savestate
|
- GB Memory: Actually load latch time from savestate
|
||||||
- GB Serialize: Fix game title check
|
- GB Serialize: Fix game title check
|
||||||
|
- GB, GBA: Fix sync to video with frameskip
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Timer: Use global cycles for timers
|
- GBA Timer: Use global cycles for timers
|
||||||
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
|
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
|
||||||
|
|
|
@ -338,10 +338,10 @@ void _updateFrameCount(struct mTiming* timing, void* context, uint32_t cyclesLat
|
||||||
}
|
}
|
||||||
|
|
||||||
GBFrameEnded(video->p);
|
GBFrameEnded(video->p);
|
||||||
|
mCoreSyncPostFrame(video->p->sync);
|
||||||
--video->frameskipCounter;
|
--video->frameskipCounter;
|
||||||
if (video->frameskipCounter < 0) {
|
if (video->frameskipCounter < 0) {
|
||||||
video->renderer->finishFrame(video->renderer);
|
video->renderer->finishFrame(video->renderer);
|
||||||
mCoreSyncPostFrame(video->p->sync);
|
|
||||||
video->frameskipCounter = video->frameskip;
|
video->frameskipCounter = video->frameskip;
|
||||||
}
|
}
|
||||||
++video->frameCounter;
|
++video->frameCounter;
|
||||||
|
|
|
@ -157,9 +157,9 @@ void _startHdraw(struct mTiming* timing, void* context, uint32_t cyclesLate) {
|
||||||
GBARaiseIRQ(video->p, IRQ_VBLANK);
|
GBARaiseIRQ(video->p, IRQ_VBLANK);
|
||||||
}
|
}
|
||||||
GBAFrameEnded(video->p);
|
GBAFrameEnded(video->p);
|
||||||
|
mCoreSyncPostFrame(video->p->sync);
|
||||||
--video->frameskipCounter;
|
--video->frameskipCounter;
|
||||||
if (video->frameskipCounter < 0) {
|
if (video->frameskipCounter < 0) {
|
||||||
mCoreSyncPostFrame(video->p->sync);
|
|
||||||
video->frameskipCounter = video->frameskip;
|
video->frameskipCounter = video->frameskip;
|
||||||
}
|
}
|
||||||
++video->frameCounter;
|
++video->frameCounter;
|
||||||
|
|
Loading…
Reference in New Issue