From 75be59a6508e3fd2671c7948216a2f2765b19854 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 15 Nov 2015 00:18:52 -0600 Subject: [PATCH] revise UDLR mutexing to be a bit more graceful --- BizHawk.Client.Common/inputAdapters/InputAdapters.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BizHawk.Client.Common/inputAdapters/InputAdapters.cs b/BizHawk.Client.Common/inputAdapters/InputAdapters.cs index 414f229943..4042aaa89d 100644 --- a/BizHawk.Client.Common/inputAdapters/InputAdapters.cs +++ b/BizHawk.Client.Common/inputAdapters/InputAdapters.cs @@ -121,8 +121,11 @@ namespace BizHawk.Client.Common //" C " is for N64 "P1 C Up" and the like, which should not be subject to mutexing + //regarding the unpressing and UDLR logic...... don't think about it. don't question it. don't look at it. + if (button.Contains("Down") && !button.Contains(" C ")) { + if (!Source.IsPressed(button)) Unpresses.Remove(button); prefix = button.GetPrecedingString("Down"); string other = prefix + "Up"; if (Source.IsPressed(other)) @@ -136,6 +139,7 @@ namespace BizHawk.Client.Common if (button.Contains("Up") && !button.Contains(" C ")) { + if (!Source.IsPressed(button)) Unpresses.Remove(button); prefix = button.GetPrecedingString("Up"); string other = prefix + "Down"; if (Source.IsPressed(other)) @@ -150,6 +154,7 @@ namespace BizHawk.Client.Common if (button.Contains("Right") && !button.Contains(" C ")) { + if (!Source.IsPressed(button)) Unpresses.Remove(button); prefix = button.GetPrecedingString("Right"); string other = prefix + "Left"; if (Source.IsPressed(other)) @@ -163,6 +168,7 @@ namespace BizHawk.Client.Common if (button.Contains("Left") && !button.Contains(" C ")) { + if (!Source.IsPressed(button)) Unpresses.Remove(button); prefix = button.GetPrecedingString("Left"); string other = prefix + "Right"; if (Source.IsPressed(other))