Fix video cycle timing to match audio timing fix
Jeffrey Pfau jeffrey@endrift.com
Fri, 18 Oct 2013 09:41:01 -0700
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/gba/gba-video.c
→
src/gba/gba-video.c
@@ -63,6 +63,7 @@ }
int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) { video->nextEvent -= cycles; + video->eventDiff += cycles; if (video->nextEvent <= 0) { video->lastHblank -= video->eventDiff; video->nextHblank -= video->eventDiff;@@ -124,7 +125,7 @@ GBARaiseIRQ(video->p, IRQ_HBLANK);
} } - video->eventDiff = video->nextEvent; + video->eventDiff = 0; } return video->nextEvent; }