From 33d9b08e390d912a75a139477ecc98fbd4e14ffa Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Sat, 19 Oct 2019 21:17:47 -0400 Subject: [PATCH] Cleanup --- BizHawk.Client.EmuHawk/Input/Input.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BizHawk.Client.EmuHawk/Input/Input.cs b/BizHawk.Client.EmuHawk/Input/Input.cs index 200e0e72a9..bc45fb81a1 100644 --- a/BizHawk.Client.EmuHawk/Input/Input.cs +++ b/BizHawk.Client.EmuHawk/Input/Input.cs @@ -256,14 +256,14 @@ namespace BizHawk.Client.EmuHawk } else if (ModifierState.TryGetValue(button, out LogicalButton buttonModifierState)) { - var ieModified = new InputEvent - { - LogicalButton = buttonModifierState, - EventType = InputEventType.Release, - Source = source - }; - if (ieModified.LogicalButton != ie.LogicalButton) - _NewEvents.Add(ieModified); + if (buttonModifierState != ie.LogicalButton) + _NewEvents.Add( + new InputEvent + { + LogicalButton = buttonModifierState, + EventType = InputEventType.Release, + Source = source + }); ModifierState.Remove(button); }