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

Fix crossthread operations due to Track.Completed

This commit is contained in:
smoogipoo 2019-02-27 16:52:34 +09:00
parent 109abf4d28
commit 30815ace62
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ namespace osu.Game.Audio
private void load()
{
track = GetTrack();
track.Completed += Stop;
track.Completed += () => Schedule(Stop);
}
/// <summary>

View File

@ -351,11 +351,11 @@ namespace osu.Game.Overlays
queuedDirection = null;
}
private void currentTrackCompleted()
private void currentTrackCompleted() => Schedule(() =>
{
if (!beatmap.Disabled && beatmapSets.Any())
next();
}
});
private ScheduledDelegate pendingBeatmapSwitch;