1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 03:09:54 +08:00

Merge pull request #2438 from peppy/fix-intro-race-condition

Fix intro setting beatmap in background thread causing race conditions
This commit is contained in:
Dan Balasescu
2018-04-23 17:44:03 +09:00
committed by GitHub
Unverified
+5 -3
View File
@@ -39,6 +39,7 @@ namespace osu.Game.Screens.Menu
private Bindable<bool> menuVoice;
private Bindable<bool> menuMusic;
private Track track;
private WorkingBeatmap beatmap;
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
@@ -69,9 +70,8 @@ namespace osu.Game.Screens.Menu
}
}
Beatmap.Value = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
track = Beatmap.Value.Track;
beatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
track = beatmap.Track;
welcome = audio.Sample.Get(@"welcome");
seeya = audio.Sample.Get(@"seeya");
@@ -81,6 +81,8 @@ namespace osu.Game.Screens.Menu
{
base.OnEntering(last);
Game.Beatmap.Value = beatmap;
if (menuVoice)
welcome.Play();