all repos — mgba @ 741ac61baac7bec7101e7c24b35a13ad3e69d058

mGBA Game Boy Advance Emulator

Core: Reroot timing list when (de)scheduling
Vicki Pfau vi@endrift.com
Wed, 21 Nov 2018 23:07:25 -0500
commit

741ac61baac7bec7101e7c24b35a13ad3e69d058

parent

ff2a0f8519c89870e681171a1703ab91ade318b8

2 files changed, 9 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -137,6 +137,7 @@ - Qt: Fix mapping analog triggers (fixes mgba.io/i/495)

- Qt: Grab focus when game starts (fixes mgba.io/i/804) - Core: Remember to deinit proxy ring FIFO - GBA Savedata: Fix EEPROM writing codepath when savetype is not EEPROM + - Core: Reroot timing list when (de)scheduling Misc: - mGUI: Add SGB border configuration option - mGUI: Add support for different settings types
M src/core/timing.csrc/core/timing.c

@@ -28,6 +28,10 @@ event->when = nextEvent + timing->masterCycles;

if (nextEvent < *timing->nextEvent) { *timing->nextEvent = nextEvent; } + if (timing->reroot) { + timing->root = timing->reroot; + timing->reroot = NULL; + } struct mTimingEvent** previous = &timing->root; struct mTimingEvent* next = timing->root; unsigned priority = event->priority;

@@ -44,6 +48,10 @@ *previous = event;

} void mTimingDeschedule(struct mTiming* timing, struct mTimingEvent* event) { + if (timing->reroot) { + timing->root = timing->reroot; + timing->reroot = NULL; + } struct mTimingEvent** previous = &timing->root; struct mTimingEvent* next = timing->root; while (next) {