diff --git a/docs/release-notes.md b/docs/release-notes.md index 1933e182..175bf44a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -3,6 +3,7 @@ # Release notes ## Upcoming release * For players: + * Improved performance. * Improved error message when a mod is blocked by Windows Smart App Control. ## 4.5.2 diff --git a/src/SMAPI/Framework/Input/SInputState.cs b/src/SMAPI/Framework/Input/SInputState.cs index 0ba361a6..910bb040 100644 --- a/src/SMAPI/Framework/Input/SInputState.cs +++ b/src/SMAPI/Framework/Input/SInputState.cs @@ -95,8 +95,8 @@ internal sealed class SInputState : InputState if (this.CustomPressedKeys.Count > 0 || this.CustomReleasedKeys.Count > 0) { // reset overrides that no longer apply - this.CustomPressedKeys.RemoveWhere(key => reallyDown.Contains(key)); - this.CustomReleasedKeys.RemoveWhere(key => !reallyDown.Contains(key)); + this.CustomPressedKeys.ExceptWith(reallyDown); + this.CustomReleasedKeys.IntersectWith(reallyDown); // apply overrides if (this.ApplyOverrides(this.CustomPressedKeys, this.CustomReleasedKeys, controller, keyboard, mouse))