From 565ee43bb26639078c70e194b859a9c98ed819c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 18 Oct 2013 09:41:01 -0700 Subject: [PATCH] Fix video cycle timing to match audio timing fix --- src/gba/gba-video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gba/gba-video.c b/src/gba/gba-video.c index 4268f5977..172ec8ccc 100644 --- a/src/gba/gba-video.c +++ b/src/gba/gba-video.c @@ -63,6 +63,7 @@ void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* 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 @@ int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) { } } - video->eventDiff = video->nextEvent; + video->eventDiff = 0; } return video->nextEvent; }