1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-29 06:49:53 +08:00

Log bass issues for more than one frame

This commit is contained in:
Dean Herbert
2025-08-21 13:26:49 +09:00
Unverified
parent ddce11fbc8
commit e75a6b4010
@@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.UI
{
public ReplayInputHandler? ReplayInputHandler { get; set; }
private double? lastBackwardsSeekLogTime;
private int invalidBassTimeLogCount;
/// <summary>
/// The number of CPU milliseconds to spend at most during seek catch-up.
@@ -163,9 +163,9 @@ namespace osu.Game.Rulesets.UI
// A difference of more than 500 ms seems like a sane number we should never exceed.
if (!allowReferenceClockSeeks && Math.Abs(proposedTime - referenceClock.CurrentTime) > 1500)
{
if (lastBackwardsSeekLogTime == null || Math.Abs(Clock.CurrentTime - lastBackwardsSeekLogTime.Value) > 1000)
if (invalidBassTimeLogCount < 10)
{
lastBackwardsSeekLogTime = Clock.CurrentTime;
invalidBassTimeLogCount++;
Logger.Log("Ignoring likely invalid time value provided by BASS during gameplay");
Logger.Log($"- provided: {referenceClock.CurrentTime:N2}");
Logger.Log($"- expected: {proposedTime:N2}");
@@ -175,6 +175,8 @@ namespace osu.Game.Rulesets.UI
return;
}
invalidBassTimeLogCount = 0;
// if the proposed time is the same as the current time, assume that the clock will continue progressing in the same direction as previously.
// this avoids spurious flips in direction from -1 to 1 during rewinds.
if (state == PlaybackState.Valid && proposedTime != manualClock.CurrentTime)