From 0fb8f51df47a1701097150dd2c9103bf5044e24c Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 8 Aug 2015 13:20:30 -0700 Subject: [PATCH] GBA Hardware: Fix savestates with the Game Boy Player attached --- src/gba/hardware.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gba/hardware.c b/src/gba/hardware.c index b445660ef..5d8d28020 100644 --- a/src/gba/hardware.c +++ b/src/gba/hardware.c @@ -612,6 +612,7 @@ void GBAHardwareDeserialize(struct GBACartridgeHardware* hw, const struct GBASer hw->readWrite = state->hw.readWrite; hw->pinState = state->hw.pinState; hw->direction = state->hw.pinDirection; + hw->devices = state->hw.devices; hw->rtc = state->hw.rtc; hw->gyroSample = state->hw.gyroSample; hw->gyroEdge = state->hw.gyroEdge; @@ -624,4 +625,7 @@ void GBAHardwareDeserialize(struct GBACartridgeHardware* hw, const struct GBASer hw->gbpInputsPosted = state->hw.gbpInputsPosted; hw->gbpTxPosition = state->hw.gbpTxPosition; hw->gbpNextEvent = state->hw.gbpNextEvent; + if (hw->devices & HW_GB_PLAYER) { + GBASIOSetDriver(&hw->p->sio, &hw->gbpDriver.d, SIO_NORMAL_32); + } }