mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Updating progressBar.EndTime is more thread safe
This commit is contained in:
@ -293,17 +293,22 @@ namespace osu.Game.Overlays
|
||||
|
||||
current = beatmapBacking.Value;
|
||||
|
||||
updateProgressBar(current?.Track);
|
||||
updateProgressBarLimit(current?.Track);
|
||||
updateDisplay(beatmapBacking, direction);
|
||||
queuedDirection = null;
|
||||
}
|
||||
|
||||
private void updateProgressBar(Track t)
|
||||
private void updateProgressBarLimit(Track t)
|
||||
{
|
||||
if (t?.IsLoaded ?? false)
|
||||
progressBar.EndTime = t.Length;
|
||||
else if (t != null)
|
||||
if (t != null)
|
||||
{
|
||||
t.OnLoaded += loadedTrack => progressBar.EndTime = loadedTrack.Length;
|
||||
if (t.IsLoaded)
|
||||
{
|
||||
progressBar.EndTime = t.Length;
|
||||
t.OnLoaded = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ScheduledDelegate pendingBeatmapSwitch;
|
||||
|
Reference in New Issue
Block a user