mirror of https://github.com/mgba-emu/mgba.git
GBA SIO: Fix regression when switching modes
This commit is contained in:
parent
a2cba75819
commit
03543eeab4
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue