mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 08:27:23 +08:00
Fix volume adjust key repeat not working as expected
Regressed in https://github.com/ppy/osu/pull/31146. Closes part of https://github.com/ppy/osu/issues/31267.
This commit is contained in:
parent
62e536baf6
commit
e752531aec
@ -1428,9 +1428,18 @@ namespace osu.Game
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.DecreaseVolume:
|
||||
case GlobalAction.IncreaseVolume:
|
||||
return volume.Adjust(e.Action);
|
||||
}
|
||||
|
||||
// All actions below this point don't allow key repeat.
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
// Wait until we're loaded at least to the intro before allowing various interactions.
|
||||
if (introScreen == null) return false;
|
||||
|
||||
switch (e.Action)
|
||||
@ -1442,10 +1451,6 @@ namespace osu.Game
|
||||
case GlobalAction.ToggleMute:
|
||||
case GlobalAction.NextVolumeMeter:
|
||||
case GlobalAction.PreviousVolumeMeter:
|
||||
|
||||
if (e.Repeat)
|
||||
return true;
|
||||
|
||||
return volume.Adjust(e.Action);
|
||||
|
||||
case GlobalAction.ToggleFPSDisplay:
|
||||
|
Loading…
x
Reference in New Issue
Block a user