diff --git a/src/gba/gba-sio.c b/src/gba/gba-sio.c index c1cceb1d9..018a4a28f 100644 --- a/src/gba/gba-sio.c +++ b/src/gba/gba-sio.c @@ -42,6 +42,9 @@ void GBASIOInit(struct GBASIO* sio) { sio->siocnt = 0; sio->mode = -1; sio->activeDriver = 0; + sio->drivers.normal = 0; + sio->drivers.multiplayer = 0; + sio->drivers.joybus = 0; _switchMode(sio); } @@ -55,15 +58,9 @@ void GBASIODeinit(struct GBASIO* sio) { } void GBASIOSetDriverSet(struct GBASIO* sio, struct GBASIODriverSet* drivers) { - if (drivers->normal) { - GBASIOSetDriver(sio, drivers->normal, SIO_NORMAL_8); - } - if (drivers->multiplayer) { - GBASIOSetDriver(sio, drivers->multiplayer, SIO_MULTI); - } - if (drivers->joybus) { - GBASIOSetDriver(sio, drivers->multiplayer, SIO_JOYBUS); - } + GBASIOSetDriver(sio, drivers->normal, SIO_NORMAL_8); + GBASIOSetDriver(sio, drivers->multiplayer, SIO_MULTI); + GBASIOSetDriver(sio, drivers->joybus, SIO_JOYBUS); } void GBASIOSetDriver(struct GBASIO* sio, struct GBASIODriver* driver, enum GBASIOMode mode) {