all repos — mgba @ 4dd6a2930a863dac9a5c7c09ef6f9aaaca5c5ab0

mGBA Game Boy Advance Emulator

GB: Fix SGB controller incrementing (fixes #1104)
Vicki Pfau vi@endrift.com
Mon, 02 Sep 2019 22:06:10 -0700
commit

4dd6a2930a863dac9a5c7c09ef6f9aaaca5c5ab0

parent

5bdaff30b7be99eb177e05089b9699aec2f8bd07

2 files changed, 4 insertions(+), 6 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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;