mirror of https://github.com/mgba-emu/mgba.git
GBA SIO: Fix GBASIOInit unintialized access
This commit is contained in:
parent
d10b5c52e6
commit
1c7da12ddb
|
@ -51,6 +51,7 @@ void GBASIOInit(struct GBASIO* sio) {
|
||||||
sio->drivers.normal = 0;
|
sio->drivers.normal = 0;
|
||||||
sio->drivers.multiplayer = 0;
|
sio->drivers.multiplayer = 0;
|
||||||
sio->drivers.joybus = 0;
|
sio->drivers.joybus = 0;
|
||||||
|
sio->activeDriver = 0;
|
||||||
GBASIOReset(sio);
|
GBASIOReset(sio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +72,6 @@ void GBASIOReset(struct GBASIO* sio) {
|
||||||
sio->rcnt = RCNT_INITIAL;
|
sio->rcnt = RCNT_INITIAL;
|
||||||
sio->siocnt = 0;
|
sio->siocnt = 0;
|
||||||
sio->mode = -1;
|
sio->mode = -1;
|
||||||
sio->activeDriver = 0;
|
|
||||||
_switchMode(sio);
|
_switchMode(sio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue