1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:07:24 +08:00

prevent volume control from eating inputs

This commit is contained in:
OliBomby 2024-07-07 21:33:27 +02:00
parent ba44757c86
commit 5da8bb5bec
2 changed files with 12 additions and 8 deletions

View File

@ -23,15 +23,15 @@ namespace osu.Game.Overlays.Volume
{
case GlobalAction.DecreaseVolume:
case GlobalAction.IncreaseVolume:
ActionRequested?.Invoke(e.Action);
return true;
return ActionRequested?.Invoke(e.Action) == true;
case GlobalAction.ToggleMute:
case GlobalAction.NextVolumeMeter:
case GlobalAction.PreviousVolumeMeter:
if (!e.Repeat)
ActionRequested?.Invoke(e.Action);
return true;
return ActionRequested?.Invoke(e.Action) == true;
return false;
}
return false;

View File

@ -120,14 +120,18 @@ namespace osu.Game.Overlays
return true;
case GlobalAction.NextVolumeMeter:
if (State.Value == Visibility.Visible)
volumeMeters.SelectNext();
if (State.Value != Visibility.Visible)
return false;
volumeMeters.SelectNext();
Show();
return true;
case GlobalAction.PreviousVolumeMeter:
if (State.Value == Visibility.Visible)
volumeMeters.SelectPrevious();
if (State.Value != Visibility.Visible)
return false;
volumeMeters.SelectPrevious();
Show();
return true;