all repos — mgba @ 05a956cacd7028044ae85a62abdcd49bb8a6aefc

mGBA Game Boy Advance Emulator

GBA Hardware: Fix reseting the Game Boy Player features
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Aug 2015 17:19:21 -0700
commit

05a956cacd7028044ae85a62abdcd49bb8a6aefc

parent

401bc9e9d632869c25072694b3c491f86e93ba8c

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/gba/hardware.csrc/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) {