mirror of
https://github.com/ppy/osu.git
synced 2024-11-07 11:07:32 +08:00
Merge pull request #12476 from peppy/fix-volume-sideways-scroll
This commit is contained in:
commit
0988af5449
@ -44,6 +44,9 @@ namespace osu.Game.Overlays.Volume
|
||||
|
||||
protected override bool OnScroll(ScrollEvent e)
|
||||
{
|
||||
if (e.ScrollDelta.Y == 0)
|
||||
return false;
|
||||
|
||||
// forward any unhandled mouse scroll events to the volume control.
|
||||
ScrollActionRequested?.Invoke(GlobalAction.IncreaseVolume, e.ScrollDelta.Y, e.IsPrecise);
|
||||
return true;
|
||||
|
@ -245,6 +245,9 @@ namespace osu.Game.Overlays.Volume
|
||||
|
||||
private void adjust(double delta, bool isPrecise)
|
||||
{
|
||||
if (delta == 0)
|
||||
return;
|
||||
|
||||
// every adjust increment increases the rate at which adjustments happen up to a cutoff.
|
||||
// this debounce will reset on inactivity.
|
||||
accelerationDebounce?.Cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user