mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:25:39 +08:00
Fix intro setting beatmap in background thread causing race conditions
This commit is contained in:
parent
295e1c78ee
commit
2c9b2aa0e7
@ -39,6 +39,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private Bindable<bool> menuVoice;
|
private Bindable<bool> menuVoice;
|
||||||
private Bindable<bool> menuMusic;
|
private Bindable<bool> menuMusic;
|
||||||
private Track track;
|
private Track track;
|
||||||
|
private WorkingBeatmap beatmap;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
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;
|
track = Beatmap.Value.Track;
|
||||||
|
|
||||||
welcome = audio.Sample.Get(@"welcome");
|
welcome = audio.Sample.Get(@"welcome");
|
||||||
@ -81,6 +81,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
|
Game.Beatmap.Value = beatmap;
|
||||||
|
|
||||||
if (menuVoice)
|
if (menuVoice)
|
||||||
welcome.Play();
|
welcome.Play();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user