GBA SIO: Properly deinitialize SIO
Jeffrey Pfau jeffrey@endrift.com
Fri, 27 Feb 2015 01:12:58 -0800
2 files changed,
4 insertions(+),
0 deletions(-)
M
src/gba/gba.c
→
src/gba/gba.c
@@ -105,6 +105,7 @@
GBAMemoryDeinit(gba); GBAVideoDeinit(&gba->video); GBAAudioDeinit(&gba->audio); + GBASIODeinit(&gba->sio); GBARRContextDestroy(gba); }
M
src/gba/sio.c
→
src/gba/sio.c
@@ -59,6 +59,9 @@ _switchMode(sio);
} void GBASIODeinit(struct GBASIO* sio) { + if (sio->activeDriver && sio->activeDriver->unload) { + sio->activeDriver->unload(sio->activeDriver); + } if (sio->drivers.multiplayer && sio->drivers.multiplayer->deinit) { sio->drivers.multiplayer->deinit(sio->drivers.multiplayer); }