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
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); }