all repos — mgba @ 1815f1d961e06686d45b370f0b0a076c25fd9340

mGBA Game Boy Advance Emulator

GBA SIO: Fix double-unloading active driver
Vicki Pfau vi@endrift.com
Mon, 24 Feb 2020 19:55:09 -0800
commit

1815f1d961e06686d45b370f0b0a076c25fd9340

parent

e9b1f879c153d09af4cc35fd2252c68a7baef887

2 files changed, 5 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -1,6 +1,7 @@

0.8.2: (Future) Emulation fixes: - GBA SIO: Fix Multiplayer busy bit + - GBA SIO: Fix double-unloading active driver Other fixes: - Core: Fix ELF loading regression (fixes mgba.io/i/1669) - Core: Fix crash modifying hash table entry (fixes mgba.io/i/1673)
M src/gba/sio.csrc/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); }