GBA SIO: Fix writing to RCNT

This commit is contained in:
Jeffrey Pfau 2015-02-28 14:52:46 -08:00
parent 8112ffdabc
commit 9b8b56d701
1 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,8 @@ void GBASIOSetDriver(struct GBASIO* sio, struct GBASIODriver* driver, enum GBASI
}
void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value) {
sio->rcnt = value;
sio->rcnt &= 0xF;
sio->rcnt |= value & ~0xF;
_switchMode(sio);
if (sio->activeDriver && sio->activeDriver->writeRegister) {
sio->activeDriver->writeRegister(sio->activeDriver, REG_RCNT, value);