replace RemoveWhere extension with equivalent HashSet methods

This commit is contained in:
Jesse Plamondon-Willard
2026-03-22 22:48:38 -04:00
parent 7bdf9be8f1
commit dece40841b
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -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
+2 -2
View File
@@ -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))