GBA Hardware: Fix reseting the Game Boy Player features
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Aug 2015 17:19:21 -0700
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
src/gba/hardware.c
→
src/gba/hardware.c
@@ -59,10 +59,14 @@ hw->gbpDriver.p = hw;
} void GBAHardwareClear(struct GBACartridgeHardware* hw) { - hw->devices = HW_NONE; + hw->devices = HW_NONE | (hw->devices & HW_GB_PLAYER_DETECTION); hw->direction = GPIO_WRITE_ONLY; hw->pinState = 0; hw->direction = 0; + + if (hw->p->sio.drivers.normal == &hw->gbpDriver.d) { + GBASIOSetDriver(&hw->p->sio, 0, SIO_NORMAL_32); + } } void GBAHardwareGPIOWrite(struct GBACartridgeHardware* hw, uint32_t address, uint16_t value) {