1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 06:19:55 +08:00

Merge pull request #1926 from Aergwyn/preview-fixes

Minor preview fixes
This commit is contained in:
Dan Balasescu
2018-01-19 00:12:41 +09:00
committed by GitHub
Unverified
2 changed files with 8 additions and 2 deletions
@@ -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;
}
}
+6 -1
View File
@@ -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;