mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Merge pull request #1926 from Aergwyn/preview-fixes
Minor preview fixes
This commit is contained in:
commit
64c32f5715
@ -82,7 +82,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
if (Playing.Value && preview != null)
|
||||
{
|
||||
progress.Width = (float)(preview.CurrentTime / preview.Length);
|
||||
// prevent negative (potential infinite) width if a track without length was loaded
|
||||
progress.Width = preview.Length > 0 ? (float)(preview.CurrentTime / preview.Length) : 0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,12 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
private void beginAudioLoad()
|
||||
{
|
||||
if (trackLoader != null) return;
|
||||
if (trackLoader != null)
|
||||
{
|
||||
Preview = trackLoader.Preview;
|
||||
Playing.TriggerChange();
|
||||
return;
|
||||
}
|
||||
|
||||
loading = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user