-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
#nullable disable | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using osu.Framework.Allocation; | ||
using osu.Framework.Extensions.IEnumerableExtensions; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Input.Bindings; | ||
using osu.Framework.Localisation; | ||
using osu.Game.Database; | ||
using osu.Game.Input.Bindings; | ||
|
@@ -25,9 +25,9 @@ public abstract partial class KeyBindingsSubsection : SettingsSubsection | |
/// </summary> | ||
protected virtual bool AutoAdvanceTarget => false; | ||
|
||
protected IEnumerable<Framework.Input.Bindings.KeyBinding> Defaults { get; init; } | ||
protected IEnumerable<KeyBinding> Defaults { get; init; } = Array.Empty<KeyBinding>(); | ||
|
||
public RulesetInfo Ruleset { get; protected set; } | ||
public RulesetInfo? Ruleset { get; protected set; } | ||
|
||
private readonly int? variant; | ||
|
||
|
@@ -41,7 +41,7 @@ protected KeyBindingsSubsection(int? variant) | |
[BackgroundDependencyLoader] | ||
private void load(RealmAccess realm) | ||
{ | ||
string rulesetName = Ruleset?.ShortName; | ||
string? rulesetName = Ruleset?.ShortName; | ||
|
||
var bindings = realm.Run(r => r.All<RealmKeyBinding>() | ||
.Where(b => b.RulesetName == rulesetName && b.Variant == variant) | ||
|