all repos — mgba @ 77d6bda52401fa508d9d4a7f78149938a039f921

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

77d6bda52401fa508d9d4a7f78149938a039f921

parent

4e07d4cba06727d4179484a68b12ecaada66f305

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

jump to
M CHANGESCHANGES

@@ -128,6 +128,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) {