all repos — mgba @ 80960f9e9aaf22239d0dea06b2ddc18082f21b02

mGBA Game Boy Advance Emulator

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

80960f9e9aaf22239d0dea06b2ddc18082f21b02

parent

d1e01266c6848577eb42ef9f4fa23cd1af5d39ea

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