all repos — mgba @ 565ee43bb26639078c70e194b859a9c98ed819c8

mGBA Game Boy Advance Emulator

Fix video cycle timing to match audio timing fix
Jeffrey Pfau jeffrey@endrift.com
Fri, 18 Oct 2013 09:41:01 -0700
commit

565ee43bb26639078c70e194b859a9c98ed819c8

parent

093c86c94355f296a3dfb201b30f008b1893d967

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

jump to
M src/gba/gba-video.csrc/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; }