diff --git a/osu.Game/Screens/Play/SongProgress.cs b/osu.Game/Screens/Play/SongProgress.cs index c10248e97d..8cead0684e 100644 --- a/osu.Game/Screens/Play/SongProgress.cs +++ b/osu.Game/Screens/Play/SongProgress.cs @@ -145,7 +145,7 @@ namespace osu.Game.Screens.Play double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime); - if((int)progress * 100 < 100) + if(progress < 1) { bar.UpdatePosition((float)progress); graph.Progress = (int)(graph.ColumnCount * progress); diff --git a/osu.Game/Screens/Play/SongProgressInfo.cs b/osu.Game/Screens/Play/SongProgressInfo.cs index 2767e4ec63..ae6436bc6c 100644 --- a/osu.Game/Screens/Play/SongProgressInfo.cs +++ b/osu.Game/Screens/Play/SongProgressInfo.cs @@ -74,8 +74,9 @@ namespace osu.Game.Screens.Play base.Update(); double songCurrentTime = AudioClock.CurrentTime - startTime; + int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100); - if(songCurrentTime < endTime - startTime) + if (currentPercent <= 100) { int currentSecond = TimeSpan.FromMilliseconds(songCurrentTime).Seconds; @@ -92,8 +93,6 @@ namespace osu.Game.Screens.Play timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(endTime - AudioClock.CurrentTime).ToString(@"m\:ss"); } - int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100) + 1; - if (currentPercent != previousPercent) { previousPercent = currentPercent;