Core: Fix first event scheduling after loading savestate

This commit is contained in:
Vicki Pfau 2021-03-29 21:08:28 -07:00
parent 49ee6dc302
commit d4d4bfd3d1
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
0.10.0: (Future) 0.10.0: (Future)
Emulation fixes: Emulation fixes:
- Core: Fix first event scheduling after loading savestate
- GBA Memory: Fix loading Thumb savestates when in ARM mode - GBA Memory: Fix loading Thumb savestates when in ARM mode
0.9.0: (2021-03-28) 0.9.0: (2021-03-28)

View File

@ -100,7 +100,10 @@ int32_t mTimingTick(struct mTiming* timing, int32_t cycles) {
if (timing->reroot) { if (timing->reroot) {
timing->root = timing->reroot; timing->root = timing->reroot;
timing->reroot = NULL; timing->reroot = NULL;
*timing->nextEvent = mTimingNextEvent(timing); *timing->nextEvent = mTimingNextEvent(timing);
if (*timing->nextEvent <= 0) {
return mTimingTick(timing, 0);
}
} }
return *timing->nextEvent; return *timing->nextEvent;
} }