Ensure that all changes to screen backgrounds are on the correct thread

This commit is contained in:
Dean Herbert
2021-01-04 18:32:23 +09:00
parent a3e4e2f6c3
commit b3f08b29ca
12 changed files with 132 additions and 60 deletions

View File

@ -19,7 +19,6 @@ using osu.Game.Overlays;
using osu.Game.Overlays.Mods;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Select.Options;
@ -38,6 +37,7 @@ using osu.Game.Collections;
using osu.Game.Graphics.UserInterface;
using osu.Game.Scoring;
using System.Diagnostics;
using osu.Game.Screens.Play;
namespace osu.Game.Screens.Select
{
@ -682,12 +682,12 @@ namespace osu.Game.Screens.Select
/// <param name="beatmap">The working beatmap.</param>
private void updateComponentFromBeatmap(WorkingBeatmap beatmap)
{
if (Background is BackgroundScreenBeatmap backgroundModeBeatmap)
ApplyToBackground(backgroundModeBeatmap =>
{
backgroundModeBeatmap.Beatmap = beatmap;
backgroundModeBeatmap.BlurAmount.Value = BACKGROUND_BLUR;
backgroundModeBeatmap.FadeColour(Color4.White, 250);
}
});
beatmapInfoWedge.Beatmap = beatmap;