From 1d254f4a56d3de34966793619a0fecdff517dbe9 Mon Sep 17 00:00:00 2001 From: ColdVolcano Date: Sun, 23 Apr 2017 00:13:58 -0500 Subject: [PATCH 1/3] Take MusicController back to life --- osu.Game/Beatmaps/WorkingBeatmap.cs | 4 ++-- osu.Game/Overlays/MusicController.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index e9271492e4..6270e780ce 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -18,7 +18,7 @@ namespace osu.Game.Beatmaps public readonly BeatmapSetInfo BeatmapSetInfo; - public readonly Bindable> Mods = new Bindable>(); + public readonly Bindable> Mods = new Bindable>(new Mod[] { }); public readonly bool WithStoryboard; @@ -27,7 +27,7 @@ namespace osu.Game.Beatmaps BeatmapInfo = beatmapInfo; BeatmapSetInfo = beatmapSetInfo; WithStoryboard = withStoryboard; - + Mods.ValueChanged += mods => applyRateAdjustments(); } diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 9d21a0341c..399c352ee3 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -22,6 +22,7 @@ using osu.Game.Database; using osu.Game.Graphics; using osu.Framework.Graphics.Primitives; using osu.Game.Graphics.Sprites; +using osu.Framework.Extensions; using osu.Framework.Extensions.Color4Extensions; namespace osu.Game.Overlays @@ -293,7 +294,7 @@ namespace osu.Game.Overlays trackManager.SetExclusive(current.Track); current.Track.Start(); beatmapSource.Value = current; - }); + }).ContinueWith(task => Schedule(() => task.ThrowIfFaulted())); updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev); } From 4b69477531afd5b4ed0f589323e0bfe44d3a021d Mon Sep 17 00:00:00 2001 From: ColdVolcano Date: Sun, 23 Apr 2017 00:41:15 -0500 Subject: [PATCH 2/3] Trim whitespace --- osu.Game/Beatmaps/WorkingBeatmap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index 6270e780ce..616128dab5 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -27,7 +27,7 @@ namespace osu.Game.Beatmaps BeatmapInfo = beatmapInfo; BeatmapSetInfo = beatmapSetInfo; WithStoryboard = withStoryboard; - + Mods.ValueChanged += mods => applyRateAdjustments(); } From 6a05440e6caba16584b4226273dfbbe8c35f8006 Mon Sep 17 00:00:00 2001 From: ColdVolcano Date: Sun, 23 Apr 2017 00:53:21 -0500 Subject: [PATCH 3/3] Only schedule when faulted --- osu.Game/Overlays/MusicController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 399c352ee3..19e742facb 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -294,7 +294,7 @@ namespace osu.Game.Overlays trackManager.SetExclusive(current.Track); current.Track.Start(); beatmapSource.Value = current; - }).ContinueWith(task => Schedule(() => task.ThrowIfFaulted())); + }).ContinueWith(task => Schedule(() => task.ThrowIfFaulted()), TaskContinuationOptions.OnlyOnFaulted); updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev); }