mirror of https://github.com/ppy/osu
Fix regression causing global hotkeys to no longer work
This commit is contained in:
parent
a19fc28cff
commit
a44ff5a2c2
|
@ -10,7 +10,7 @@ namespace osu.Game.Rulesets.Catch
|
|||
public class CatchInputManager : DatabasedKeyBindingInputManager<CatchAction>
|
||||
{
|
||||
public CatchInputManager(RulesetInfo ruleset)
|
||||
: base(ruleset, simultaneousMode: SimultaneousBindingMode.Unique)
|
||||
: base(ruleset, 0, SimultaneousBindingMode.Unique)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Osu
|
|||
{
|
||||
public class OsuInputManager : DatabasedKeyBindingInputManager<OsuAction>
|
||||
{
|
||||
public OsuInputManager(RulesetInfo ruleset) : base(ruleset, simultaneousMode: SimultaneousBindingMode.Unique)
|
||||
public OsuInputManager(RulesetInfo ruleset) : base(ruleset, 0, SimultaneousBindingMode.Unique)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Input.Bindings;
|
||||
|
@ -17,7 +18,7 @@ public abstract class DatabasedKeyBindingInputManager<T> : KeyBindingInputManage
|
|||
{
|
||||
private readonly RulesetInfo ruleset;
|
||||
|
||||
private readonly int variant;
|
||||
private readonly int? variant;
|
||||
|
||||
private KeyBindingStore store;
|
||||
|
||||
|
@ -29,11 +30,14 @@ public abstract class DatabasedKeyBindingInputManager<T> : KeyBindingInputManage
|
|||
/// <param name="ruleset">A reference to identify the current <see cref="Ruleset"/>. Used to lookup mappings. Null for global mappings.</param>
|
||||
/// <param name="variant">An optional variant for the specified <see cref="Ruleset"/>. Used when a ruleset has more than one possible keyboard layouts.</param>
|
||||
/// <param name="simultaneousMode">Specify how to deal with multiple matches of <see cref="KeyCombination"/>s and <see cref="T"/>s.</param>
|
||||
protected DatabasedKeyBindingInputManager(RulesetInfo ruleset = null, int variant = 0, SimultaneousBindingMode simultaneousMode = SimultaneousBindingMode.None)
|
||||
protected DatabasedKeyBindingInputManager(RulesetInfo ruleset = null, int? variant = null, SimultaneousBindingMode simultaneousMode = SimultaneousBindingMode.None)
|
||||
: base(simultaneousMode)
|
||||
{
|
||||
this.ruleset = ruleset;
|
||||
this.variant = variant;
|
||||
|
||||
if (ruleset != null && variant == null)
|
||||
throw new InvalidOperationException($"{nameof(variant)} can not be null when a non-null {nameof(ruleset)} is provided.");
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
|
Loading…
Reference in New Issue