all repos — mgba @ 8112ffdabc633f92ce61d4716b9f7857a2cf1a97

mGBA Game Boy Advance Emulator

GBA SIO: Properly deinitialize SIO
Jeffrey Pfau jeffrey@endrift.com
Fri, 27 Feb 2015 01:12:58 -0800
commit

8112ffdabc633f92ce61d4716b9f7857a2cf1a97

parent

a5a7ace86eb0feaf156842029af59a869151712a

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

jump to
M src/gba/gba.csrc/gba/gba.c

@@ -105,6 +105,7 @@

GBAMemoryDeinit(gba); GBAVideoDeinit(&gba->video); GBAAudioDeinit(&gba->audio); + GBASIODeinit(&gba->sio); GBARRContextDestroy(gba); }
M src/gba/sio.csrc/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); }