aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNebuleon Fumika2012-12-21 11:57:45 -0500
committerNebuleon Fumika2012-12-21 11:57:45 -0500
commit371058df321a26ef2fcc9b82f5d2ac8db3fb4e65 (patch)
treec5cee41fac95e6fed21b99f089398084f8c329f7
parenta0d0c5e7a5bdc396b4c370a750273b6e3b963bb0 (diff)
downloadsnes9x2005-371058df321a26ef2fcc9b82f5d2ac8db3fb4e65.tar.gz
snes9x2005-371058df321a26ef2fcc9b82f5d2ac8db3fb4e65.tar.bz2
snes9x2005-371058df321a26ef2fcc9b82f5d2ac8db3fb4e65.zip
ppu.cpp: Sync fewer bits of the joypad.
-rw-r--r--source/ppu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/ppu.cpp b/source/ppu.cpp
index e0c6e24..904bcde 100644
--- a/source/ppu.cpp
+++ b/source/ppu.cpp
@@ -3213,7 +3213,7 @@ void S9xUpdateJoypads ()
{
IPPU.Joypads [i] = 0;
// Sync each key
- for (k = 1; k != 0x80000000; k <<= 1)
+ for (k = SNES_TR_MASK /* lowest value */; k != SNES_B_MASK << 1 /* one bit past the highest value */; k <<= 1)
{
KeyValue = IPPU.JoypadsAtHBlanks[i][0] & k;
StartedPressed = KeyValue != 0;
@@ -3246,9 +3246,9 @@ void S9xUpdateJoypads ()
for (i = 0; i < 5; i++)
{
- if (IPPU.Joypads [i] & SNES_LEFT_MASK)
+ if (IPPU.Joypads [i] & (SNES_LEFT_MASK | SNES_RIGHT_MASK))
IPPU.Joypads [i] &= ~SNES_RIGHT_MASK;
- if (IPPU.Joypads [i] & SNES_UP_MASK)
+ if (IPPU.Joypads [i] & (SNES_UP_MASK | SNES_DOWN_MASK))
IPPU.Joypads [i] &= ~SNES_DOWN_MASK;
}