From ae3b4fad83acca1b16e0688b1d3a71e9551c63a0 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 4 Aug 2011 02:47:05 +0000 Subject: [PATCH] fix reset menu item? --- BizHawk.MultiClient/Input/ControllerBinding.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/Input/ControllerBinding.cs b/BizHawk.MultiClient/Input/ControllerBinding.cs index 22f3fa75e2..5e88a6659e 100644 --- a/BizHawk.MultiClient/Input/ControllerBinding.cs +++ b/BizHawk.MultiClient/Input/ControllerBinding.cs @@ -37,10 +37,12 @@ namespace BizHawk.MultiClient } /// - /// uses the bindings to latch our own logical button state from the source controller's button state (which are assumed to be the physical side of the binding) + /// uses the bindings to latch our own logical button state from the source controller's button state (which are assumed to be the physical side of the binding). + /// this will clobber any existing data (use OR_* or other functions to layer in additional input sources) /// public void LatchFromPhysical(IController controller) { + buttons.Clear(); foreach (var kvp in bindings) { buttons[kvp.Key] = false; @@ -61,7 +63,10 @@ namespace BizHawk.MultiClient foreach (string button in type.BoolButtons) { if (controller.IsPressed(button)) + { buttons[button] = true; + Console.WriteLine(button); + } } }