1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00

Merge pull request #1040 from MrTheMake/previewtime-seeking

Fix double-seek in main menu song playback
This commit is contained in:
Dean Herbert 2017-07-21 15:11:41 +09:00 committed by GitHub
commit db35b0ab31

View File

@ -94,9 +94,7 @@ namespace osu.Game.Screens.Menu
{ {
if (!track.IsRunning) if (!track.IsRunning)
{ {
track.Seek(metadata.PreviewTime); track.Seek(metadata.PreviewTime != -1 ? metadata.PreviewTime : 0.4f * track.Length);
if (metadata.PreviewTime == -1)
track.Seek(track.Length * 0.4f);
track.Start(); track.Start();
} }
} }