Use a global ruleset config cache

This commit is contained in:
smoogipoo
2018-06-11 15:07:42 +09:00
parent be01dbae3a
commit 14b7530994
4 changed files with 51 additions and 11 deletions

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Game.Rulesets;
namespace osu.Game.Overlays.Settings
@ -26,7 +25,7 @@ namespace osu.Game.Overlays.Settings
{
dependencies = new DependencyContainer(base.CreateLocalDependencies(parent));
var config = ruleset.CreateConfig(dependencies.Get<SettingsStore>());
var config = dependencies.Get<RulesetConfigCache>().GetConfigFor(ruleset);
if (config != null)
dependencies.Cache(config);