mirror of https://github.com/mgba-emu/mgba.git
GBA SIO: Properly deinitialize SIO
This commit is contained in:
parent
a5a7ace86e
commit
8112ffdabc
|
@ -105,6 +105,7 @@ void GBADestroy(struct GBA* gba) {
|
||||||
GBAMemoryDeinit(gba);
|
GBAMemoryDeinit(gba);
|
||||||
GBAVideoDeinit(&gba->video);
|
GBAVideoDeinit(&gba->video);
|
||||||
GBAAudioDeinit(&gba->audio);
|
GBAAudioDeinit(&gba->audio);
|
||||||
|
GBASIODeinit(&gba->sio);
|
||||||
GBARRContextDestroy(gba);
|
GBARRContextDestroy(gba);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,9 @@ void GBASIOInit(struct GBASIO* sio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBASIODeinit(struct GBASIO* 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) {
|
if (sio->drivers.multiplayer && sio->drivers.multiplayer->deinit) {
|
||||||
sio->drivers.multiplayer->deinit(sio->drivers.multiplayer);
|
sio->drivers.multiplayer->deinit(sio->drivers.multiplayer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue