all repos — mgba @ b61b8a0d2be4d4ac39b497b4ce85259250eec3d7

mGBA Game Boy Advance Emulator

Core: Fix timing until/next
Vicki Pfau vi@endrift.com
Thu, 22 Jun 2017 02:18:40 -0700
commit

b61b8a0d2be4d4ac39b497b4ce85259250eec3d7

parent

4efd494cd7389f3753389fe0649c251ca68a01be

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

jump to
M src/core/timing.csrc/core/timing.c

@@ -89,9 +89,9 @@ struct mTimingEvent* next = timing->root;

if (!next) { return INT_MAX; } - return next->when - timing->masterCycles; + return next->when - timing->masterCycles - *timing->relativeCycles; } int32_t mTimingUntil(const struct mTiming* timing, const struct mTimingEvent* event) { - return event->when - timing->masterCycles; + return event->when - timing->masterCycles - *timing->relativeCycles; }