1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 21:47:25 +08:00

Merge pull request #4343 from smoogipoo/fix-crossthread

Fix crossthread access + music looping not working
This commit is contained in:
Dan Balasescu 2019-02-27 19:27:36 +09:00 committed by GitHub
commit 374750eef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

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

View File

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