GBA SIO: Fix RCNT mode selection

This commit is contained in:
Jeffrey Pfau 2015-03-02 01:20:12 -08:00
parent dcd2e3a64f
commit 9273a4ca72
1 changed files with 2 additions and 2 deletions

View File

@ -36,11 +36,11 @@ static void _switchMode(struct GBASIO* sio) {
} else {
sio->mode = (enum GBASIOMode) (mode & 0xC);
}
if (oldMode != mode) {
if (oldMode != sio->mode) {
if (sio->activeDriver && sio->activeDriver->unload) {
sio->activeDriver->unload(sio->activeDriver);
}
sio->activeDriver = _lookupDriver(sio, mode);
sio->activeDriver = _lookupDriver(sio, sio->mode);
if (sio->activeDriver && sio->activeDriver->load) {
sio->activeDriver->load(sio->activeDriver);
}