remove wrapping on DS layout hotkeys

This commit is contained in:
adelikat 2020-04-01 19:28:22 -05:00
parent ba27cd5c7e
commit 86f5964262
1 changed files with 7 additions and 10 deletions

View File

@ -804,14 +804,10 @@ namespace BizHawk.Client.EmuHawk
{
num++;
}
var next = (MelonDS.ScreenLayoutKind)Enum.Parse(typeof(MelonDS.ScreenLayoutKind), num.ToString());
if (!typeof(MelonDS.ScreenLayoutKind).IsEnumDefined(next))
{
next = decrement
? Enum.GetValues(typeof(MelonDS.ScreenLayoutKind)).Cast<MelonDS.ScreenLayoutKind>().Last()
: default;
}
var next = (MelonDS.ScreenLayoutKind)Enum.Parse(typeof(MelonDS.ScreenLayoutKind), num.ToString());
if (typeof(MelonDS.ScreenLayoutKind).IsEnumDefined(next))
{
settings.ScreenLayout = next;
ds.PutSettings(settings);
@ -819,6 +815,7 @@ namespace BizHawk.Client.EmuHawk
FrameBufferResized();
}
}
}
// Determines if the value is a hotkey that would be handled outside of the CheckHotkey method
private bool IsInternalHotkey(string trigger)