GBA SIO: Fix double-unloading active driver
Vicki Pfau vi@endrift.com
Mon, 24 Feb 2020 19:55:09 -0800
2 files changed,
5 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -10,6 +10,7 @@ - GBA BIOS: Improve HLE BIOS timing
- GBA DMA: Linger last DMA on bus (fixes mgba.io/i/301 and mgba.io/i/1320) - GBA Memory: Improve gamepak prefetch timing - GBA SIO: Fix Multiplayer busy bit + - GBA SIO: Fix double-unloading active driver - GBA Video: Latch scanline at end of Hblank (fixes mgba.io/i/1319) - GBA Video: Fix Hblank timing Other fixes:
M
src/gba/sio.c
→
src/gba/sio.c
@@ -75,10 +75,13 @@ }
} void GBASIOReset(struct GBASIO* sio) { - GBASIODeinit(sio); + if (sio->activeDriver && sio->activeDriver->unload) { + sio->activeDriver->unload(sio->activeDriver); + } sio->rcnt = RCNT_INITIAL; sio->siocnt = 0; sio->mode = -1; + sio->activeDriver = NULL; _switchMode(sio); }