mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Softly handle invalid beat divisors instead of throwing
This commit is contained in:
parent
998e1dfe47
commit
36cc79f04f
@ -29,7 +29,10 @@ namespace osu.Game.Screens.Edit
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (!VALID_DIVISORS.Contains(value))
|
if (!VALID_DIVISORS.Contains(value))
|
||||||
throw new ArgumentOutOfRangeException($"Provided divisor is not in {nameof(VALID_DIVISORS)}");
|
{
|
||||||
|
// If it doesn't match, value will be 0, but will be clamped to the valid range via DefaultMinValue
|
||||||
|
value = Array.FindLast(VALID_DIVISORS, d => d < value);
|
||||||
|
}
|
||||||
|
|
||||||
base.Value = value;
|
base.Value = value;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user