1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Prevent ruleset input managers from reading duplicate bindings

This commit is contained in:
Bartłomiej Dach 2023-10-16 21:02:24 +02:00
parent 90c44cee54
commit 639c96e60c
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,7 @@ namespace osu.Game.Input
/// </summary>
/// <param name="keyBindings">The <see cref="RealmKeyBinding"/>s to de-duplicate.</param>
/// <returns>Whether any bindings have been cleared.</returns>
public static bool ClearDuplicateBindings(IQueryable<RealmKeyBinding> keyBindings)
public static bool ClearDuplicateBindings(IQueryable<IKeyBinding> keyBindings)
{
bool anyRemoved = false;

View File

@ -218,6 +218,7 @@ namespace osu.Game.Rulesets.UI
base.ReloadMappings(realmKeyBindings);
KeyBindings = KeyBindings.Where(b => RealmKeyBindingStore.CheckValidForGameplay(b.KeyCombination)).ToList();
RealmKeyBindingStore.ClearDuplicateBindings(KeyBindings.AsQueryable());
}
}
}