GBA SIO: Fix regression when switching modes

This commit is contained in:
Jeffrey Pfau 2015-05-29 22:51:34 -07:00
parent a2cba75819
commit 03543eeab4
1 changed files with 4 additions and 1 deletions

View File

@ -131,6 +131,10 @@ void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value) {
}
void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value) {
if ((value ^ sio->siocnt) & 0x3000) {
sio->siocnt = value & 0x3000;
_switchMode(sio);
}
if (sio->activeDriver && sio->activeDriver->writeRegister) {
value = sio->activeDriver->writeRegister(sio->activeDriver, REG_SIOCNT, value);
} else {
@ -151,7 +155,6 @@ void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value) {
}
}
sio->siocnt = value;
_switchMode(sio);
}
void GBASIOWriteSIOMLT_SEND(struct GBASIO* sio, uint16_t value) {