From 2c9b2aa0e7bdcbe34f6cd4c35487339dcbbe1884 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 22 Apr 2018 02:42:48 +0900 Subject: [PATCH 1/2] Fix intro setting beatmap in background thread causing race conditions --- osu.Game/Screens/Menu/Intro.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index c62a622c3c..68b94ac7f9 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -39,6 +39,7 @@ namespace osu.Game.Screens.Menu private Bindable menuVoice; private Bindable menuMusic; private Track track; + private WorkingBeatmap beatmap; [BackgroundDependencyLoader] private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game) @@ -69,8 +70,7 @@ namespace osu.Game.Screens.Menu } } - Beatmap.Value = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]); - + beatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]); track = Beatmap.Value.Track; welcome = audio.Sample.Get(@"welcome"); @@ -81,6 +81,8 @@ namespace osu.Game.Screens.Menu { base.OnEntering(last); + Game.Beatmap.Value = beatmap; + if (menuVoice) welcome.Play(); From 2d82c0b5cdadeea5409734efc85a511dd63fecc9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 23 Apr 2018 16:41:15 +0900 Subject: [PATCH 2/2] Fix logical regression --- osu.Game/Screens/Menu/Intro.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 68b94ac7f9..4de76e530a 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -71,7 +71,7 @@ namespace osu.Game.Screens.Menu } beatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]); - track = Beatmap.Value.Track; + track = beatmap.Track; welcome = audio.Sample.Get(@"welcome"); seeya = audio.Sample.Get(@"seeya");