mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 10:17:19 +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)
|
protected override bool OnScroll(ScrollEvent e)
|
||||||
{
|
{
|
||||||
|
if (e.ScrollDelta.Y == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
// forward any unhandled mouse scroll events to the volume control.
|
// forward any unhandled mouse scroll events to the volume control.
|
||||||
ScrollActionRequested?.Invoke(GlobalAction.IncreaseVolume, e.ScrollDelta.Y, e.IsPrecise);
|
ScrollActionRequested?.Invoke(GlobalAction.IncreaseVolume, e.ScrollDelta.Y, e.IsPrecise);
|
||||||
return true;
|
return true;
|
||||||
|
@ -245,6 +245,9 @@ namespace osu.Game.Overlays.Volume
|
|||||||
|
|
||||||
private void adjust(double delta, bool isPrecise)
|
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.
|
// every adjust increment increases the rate at which adjustments happen up to a cutoff.
|
||||||
// this debounce will reset on inactivity.
|
// this debounce will reset on inactivity.
|
||||||
accelerationDebounce?.Cancel();
|
accelerationDebounce?.Cancel();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user