GB: Fix SGB controller incrementing (fixes #1104)
Vicki Pfau vi@endrift.com
Mon, 02 Sep 2019 22:06:10 -0700
2 files changed,
4 insertions(+),
6 deletions(-)
M
CHANGES
→
CHANGES
@@ -21,6 +21,7 @@ - Qt: Fix race conditions initializing GDB stub
- GBA: Set up GPIO mapping on null and ELF ROM regions (fixes mgba.io/i/1481) - GBA Cheats: Fix value incrementing in CB slide codes (fixes mgba.io/i/1501) - Qt: Improve cheat view UX + - GB: Fix SGB controller incrementing (fixes mgba.io/i/1104) Misc: - Qt: Make mute menu option also toggle fast-forward mute (fixes mgba.io/i/1424) - Qt: Show error message if file failed to load
M
src/gb/io.c
→
src/gb/io.c
@@ -119,14 +119,11 @@ gb->currentSgbBits = bits;
if (gb->sgbBit > 128) { switch (bits) { case 1: - gb->sgbBit |= 2; - break; - case 2: - gb->sgbBit |= 4; + gb->sgbBit ^= 2; break; case 3: - if (gb->sgbBit == 135) { - gb->sgbBit &= ~6; + if (gb->sgbBit == 131) { + gb->sgbBit &= ~2; gb->sgbCurrentController = (gb->sgbCurrentController + 1) & gb->sgbControllers; } break;