Skip to content

Commit

Permalink
Fixed an issue preventing Hotkeys from executing after HC has restart…
Browse files Browse the repository at this point in the history
…ed. (Valkirie#301)

This was caused by a broken ButtonState Equals() check when both list were unordered
  • Loading branch information
Valkirie authored Jun 7, 2024
1 parent 4fd657a commit fffbe68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HandheldCompanion/Inputs/ButtonState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void AddRange(ButtonState buttonState)
public override bool Equals(object obj)
{
if (obj is ButtonState buttonState)
return buttonState.Buttons.SequenceEqual(Buttons);
return Enumerable.SequenceEqual(Buttons.OrderBy(e => e), buttonState.Buttons.OrderBy(e => e));

return false;
}
Expand Down

0 comments on commit fffbe68

Please sign in to comment.