From 1a7f8b0ff8c6f8d5b9ecbc45a9acadbc52494e4c Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Thu, 25 May 2017 12:53:11 -0400 Subject: [PATCH] Fix #857 --- .../Consoles/Nintendo/NES/NESControllers.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs index 765eadc234..48adc81990 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NESControllers.cs @@ -933,12 +933,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return 0; int idx = row * 8 + column * 4; - byte ret = 0; + byte ret = 0x1E; - if (c.IsPressed(Buttons[idx])) ret |= 16; - if (c.IsPressed(Buttons[idx + 1])) ret |= 8; - if (c.IsPressed(Buttons[idx + 2])) ret |= 4; - if (c.IsPressed(Buttons[idx + 3])) ret |= 2; + if (c.IsPressed(Buttons[idx])) ret &= 0x0E; + if (c.IsPressed(Buttons[idx + 1])) ret &= 0x16; + if (c.IsPressed(Buttons[idx + 2])) ret &= 0x1A; + if (c.IsPressed(Buttons[idx + 3])) ret &= 0x1C; // nothing is clocked here return ret;