Skip to content

Commit

Permalink
Serialize light counter to the correct bitfield
Browse files Browse the repository at this point in the history
Resolves #3294
  • Loading branch information
CasualPokePlayer authored and endrift committed Nov 20, 2024
1 parent 2a0ed00 commit cca3267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gba/cart/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ void GBAHardwareSerialize(const struct GBACartridgeHardware* hw, struct GBASeria
STORE_16(hw->tiltY, 0, &state->hw.tiltSampleY);
state->hw.lightSample = hw->lightSample;
flags1 = GBASerializedHWFlags1SetLightEdge(flags1, hw->lightEdge);
flags1 = GBASerializedHWFlags1SetLightCounter(flags1, hw->lightCounter);
STORE_16(flags1, 0, &state->hw.flags1);

GBASerializedHWFlags2 flags2 = 0;
flags2 = GBASerializedHWFlags2SetTiltState(flags2, hw->tiltState);
flags2 = GBASerializedHWFlags1SetLightCounter(flags2, hw->lightCounter);

// GBP/SIO stuff is only here for legacy reasons
flags2 = GBASerializedHWFlags2SetGbpInputsPosted(flags2, hw->p->sio.gbp.inputsPosted);
Expand Down

0 comments on commit cca3267

Please sign in to comment.