mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Make background update happens in update thread, and thread-safer.
This commit is contained in:
@ -249,13 +249,13 @@ namespace osu.Game.Overlays
|
||||
private void play(BeatmapInfo info, bool? isNext)
|
||||
{
|
||||
current = database.GetWorkingBeatmap(info, current);
|
||||
Task.Factory.StartNew(() =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
trackManager.SetExclusive(current.Track);
|
||||
current.Track.Start();
|
||||
beatmapSource.Value = current;
|
||||
updateCurrent(current, isNext);
|
||||
});
|
||||
updateCurrent(current, isNext);
|
||||
}
|
||||
|
||||
private void updateCurrent(WorkingBeatmap beatmap, bool? isNext)
|
||||
@ -284,7 +284,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
else
|
||||
{
|
||||
Remove(backgroundSprite);
|
||||
backgroundSprite.Expire();
|
||||
}
|
||||
|
||||
backgroundSprite = newBackground;
|
||||
|
Reference in New Issue
Block a user