Fix mode cycling and add test coverage

This commit is contained in:
Dean Herbert
2022-06-11 21:36:41 +09:00
parent 0c333e5c08
commit 8d53ed64a3
2 changed files with 8 additions and 1 deletions

View File

@ -241,7 +241,8 @@ namespace osu.Game.Screens.Utility
switch (e.Key)
{
case Key.Space:
VisualMode.Value = (LatencyVisualMode)(((int)VisualMode.Value + 1) % 3);
int availableModes = Enum.GetValues(typeof(LatencyVisualMode)).Length;
VisualMode.Value = (LatencyVisualMode)(((int)VisualMode.Value + 1) % availableModes);
return true;
case Key.Tab: