Move ruleset key binding registration to an explicit method rather than the constructor

This commit is contained in:
Dean Herbert
2021-01-12 14:59:48 +09:00
parent ff16d2f490
commit a6997a6fc6
2 changed files with 21 additions and 15 deletions

View File

@ -267,7 +267,7 @@ namespace osu.Game
migrateDataToRealm();
dependencies.CacheAs(KeyBindingStore = new RealmKeyBindingStore(realmFactory, RulesetStore));
dependencies.CacheAs(KeyBindingStore = new RealmKeyBindingStore(realmFactory));
dependencies.Cache(SettingsStore = new SettingsStore(contextFactory));
dependencies.Cache(RulesetConfigCache = new RulesetConfigCache(SettingsStore));
@ -310,6 +310,10 @@ namespace osu.Game
base.Content.Add(CreateScalingContainer().WithChild(MenuCursorContainer));
KeyBindingStore.Register(globalBindings);
foreach (var r in RulesetStore.AvailableRulesets)
KeyBindingStore.Register(r);
dependencies.Cache(globalBindings);
PreviewTrackManager previewTrackManager;