1
0
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:
Dean Herbert 2024-12-26 15:05:59 +09:00
parent 62e536baf6
commit e752531aec
No known key found for this signature in database

View File

@ -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: