1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:05:35 +08:00

Fix storyboard potentially being loaded many times

This commit is contained in:
Dean Herbert 2019-02-28 20:36:00 +09:00
parent 53eb0e7e4e
commit 30e820d107

View File

@ -349,10 +349,9 @@ namespace osu.Game.Screens.Play
.Delay(250)
.FadeIn(250);
ShowStoryboard.ValueChanged += s =>
ShowStoryboard.ValueChanged += enabled =>
{
if (s.NewValue && storyboard == null)
initializeStoryboard(true);
if (enabled.NewValue) initializeStoryboard(true);
};
Background.EnableUserDim.Value = true;
@ -427,7 +426,7 @@ namespace osu.Game.Screens.Play
private void initializeStoryboard(bool asyncLoad)
{
if (StoryboardContainer == null)
if (StoryboardContainer == null || storyboard != null)
return;
var beatmap = Beatmap.Value;