all repos — mgba @ 0fb8f51df47a1701097150dd2c9103bf5044e24c

mGBA Game Boy Advance Emulator

GBA Hardware: Fix savestates with the Game Boy Player attached
Jeffrey Pfau jeffrey@endrift.com
Sat, 08 Aug 2015 13:20:30 -0700
commit

0fb8f51df47a1701097150dd2c9103bf5044e24c

parent

c9c9ff802c424c39a7b5be207789152553944e6d

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gba/hardware.csrc/gba/hardware.c

@@ -612,6 +612,7 @@ void GBAHardwareDeserialize(struct GBACartridgeHardware* hw, const struct GBASerializedState* state) {

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 @@ hw->lightEdge = state->hw.lightEdge;

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); + } }