mirror of
https://github.com/ppy/osu.git
synced 2026-05-20 06:00:25 +08:00
Change debounce consideration to use dynamic FPS moving average rather than fixed 60 fps
This should better account for scenarios where user FPS is below 60 fps. Previously the debounce would unexpectedly be longer than usual for low FPS scenarios.
This commit is contained in:
@@ -402,7 +402,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
if (debounceQueuedSelection == null) return;
|
||||
|
||||
// avoid debounce running early if there's a single long frame.
|
||||
debounceElapsedTime += Math.Min(1000 / 60.0, Clock.ElapsedFrameTime);
|
||||
debounceElapsedTime += Math.Min(1000 / Clock.FramesPerSecond, Clock.ElapsedFrameTime);
|
||||
|
||||
if (debounceElapsedTime >= SELECTION_DEBOUNCE)
|
||||
performDebounceSelection();
|
||||
|
||||
Reference in New Issue
Block a user