diff --git a/osu-framework b/osu-framework index 7c7edc0c3f..7cad7cf48b 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 7c7edc0c3f4504c179e050ac98dc9ca2831602c9 +Subproject commit 7cad7cf48b2ae9f16cac503d46bd0ea801e7561f diff --git a/osu.Desktop.Tests/BenchmarkTest.cs b/osu.Desktop.Tests/BenchmarkTest.cs index c55b98aa57..6d001655ec 100644 --- a/osu.Desktop.Tests/BenchmarkTest.cs +++ b/osu.Desktop.Tests/BenchmarkTest.cs @@ -25,8 +25,7 @@ namespace osu.Desktop.Tests Ruleset.Register(new ManiaRuleset()); Ruleset.Register(new CatchRuleset()); - host.Add(new Benchmark()); - host.Run(); + host.Run(new Benchmark()); } } } diff --git a/osu.Desktop.VisualTests/Program.cs b/osu.Desktop.VisualTests/Program.cs index 6d51e9162d..6760852cf0 100644 --- a/osu.Desktop.VisualTests/Program.cs +++ b/osu.Desktop.VisualTests/Program.cs @@ -27,10 +27,9 @@ namespace osu.Desktop.VisualTests Ruleset.Register(new CatchRuleset()); if (benchmark) - host.Add(new Benchmark()); + host.Run(new Benchmark()); else - host.Add(new VisualTestGame()); - host.Run(); + host.Run(new VisualTestGame()); } } } diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index 23de1ddbba..3171e474dc 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -46,8 +46,7 @@ namespace osu.Desktop Ruleset.Register(new ManiaRuleset()); Ruleset.Register(new CatchRuleset()); - host.Add(new OsuGameDesktop(args)); - host.Run(); + host.Run(new OsuGameDesktop(args)); } return 0; } diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index 8de1a0f918..84635af39a 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading; +using System.Threading.Tasks; using NUnit.Framework; using osu.Framework.Desktop.Platform; using osu.Framework.Platform; @@ -66,7 +67,7 @@ namespace osu.Game.Tests.Beatmaps.IO private OsuGameBase loadOsu(GameHost host) { var osu = new OsuGameBase(); - host.Add(osu); + Task.Run(() => host.Run(osu)); while (!osu.IsLoaded) Thread.Sleep(1); diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 99a37158f0..661cbe06a4 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -78,6 +78,8 @@ namespace osu.Game.Overlays private void load(OsuGameBase osuGame, OsuConfigManager config, BeatmapDatabase beatmaps, AudioManager audio, TextureStore textures, OsuColour colours) { + game = osuGame; + unicodeString = config.GetUnicodeString; Children = new Drawable[] @@ -322,12 +324,6 @@ namespace osu.Game.Overlays updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev); } - protected override void Load(Framework.Game game) - { - this.game = game; - base.Load(game); - } - Action pendingBeatmapSwitch; private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction)