mirror of https://github.com/mgba-emu/mgba.git
Core: Fix timing until/next
This commit is contained in:
parent
4efd494cd7
commit
b61b8a0d2b
|
@ -89,9 +89,9 @@ int32_t mTimingNextEvent(struct mTiming* timing) {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue