1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 21:00:33 +08:00

Revert "Load SeasonalBackgroundLoader asynchronously"

This reverts commit 81ebcd879668eb13cb28aa11bf4edfb8afb0fb99.
This commit is contained in:
Max Hübner 2020-10-29 16:01:22 +01:00
parent 7d523fee28
commit b189e0b7cf

View File

@ -25,7 +25,6 @@ namespace osu.Game.Screens.Backgrounds
private Bindable<Skin> skin;
private Bindable<BackgroundSource> mode;
private Bindable<IntroSequence> introSequence;
private readonly SeasonalBackgroundLoader seasonalBackgroundLoader = new SeasonalBackgroundLoader();
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; }
@ -51,7 +50,7 @@ namespace osu.Game.Screens.Backgrounds
currentDisplay = RNG.Next(0, background_count);
LoadComponentAsync(seasonalBackgroundLoader, _ => LoadComponentAsync(createBackground(), display));
display(createBackground());
}
private void display(Background newBackground)
@ -91,10 +90,6 @@ namespace osu.Game.Screens.Backgrounds
{
switch (mode.Value)
{
case BackgroundSource.Seasonal:
newBackground = seasonalBackgroundLoader.LoadBackground(backgroundName);
break;
case BackgroundSource.Beatmap:
newBackground = new BeatmapBackground(beatmap.Value, backgroundName);
break;
@ -105,18 +100,7 @@ namespace osu.Game.Screens.Backgrounds
}
}
else
{
switch (mode.Value)
{
case BackgroundSource.Seasonal:
newBackground = seasonalBackgroundLoader.LoadBackground(backgroundName);
break;
default:
newBackground = new Background(backgroundName);
break;
}
}
newBackground = new Background(backgroundName);
newBackground.Depth = currentDisplay;