Revert "Load SeasonalBackgroundLoader asynchronously"

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