mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 21:27:24 +08:00
Prevent ruleset input managers from reading duplicate bindings
This commit is contained in:
parent
90c44cee54
commit
639c96e60c
@ -137,7 +137,7 @@ namespace osu.Game.Input
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="keyBindings">The <see cref="RealmKeyBinding"/>s to de-duplicate.</param>
|
/// <param name="keyBindings">The <see cref="RealmKeyBinding"/>s to de-duplicate.</param>
|
||||||
/// <returns>Whether any bindings have been cleared.</returns>
|
/// <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;
|
bool anyRemoved = false;
|
||||||
|
|
||||||
|
@ -218,6 +218,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
base.ReloadMappings(realmKeyBindings);
|
base.ReloadMappings(realmKeyBindings);
|
||||||
|
|
||||||
KeyBindings = KeyBindings.Where(b => RealmKeyBindingStore.CheckValidForGameplay(b.KeyCombination)).ToList();
|
KeyBindings = KeyBindings.Where(b => RealmKeyBindingStore.CheckValidForGameplay(b.KeyCombination)).ToList();
|
||||||
|
RealmKeyBindingStore.ClearDuplicateBindings(KeyBindings.AsQueryable());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user