escape can now be bound through the special bindings dropdown menu

This commit is contained in:
zeromus 2014-04-22 19:47:02 +00:00
parent 126c13ba78
commit e6a979bfd3
1 changed files with 13 additions and 7 deletions

View File

@ -23,6 +23,7 @@ namespace BizHawk.Client.EmuHawk
/// These bindings get ignored by the widget and can only be entered by SetBinding() via the contextmenu from the InputCompositeWidget
/// </summary>
public static readonly string[] SpecialBindings = new[] {
"Escape",
"WMouse L","WMouse M","WMouse R",
"WMouse 1", "WMouse 2"
};
@ -142,24 +143,29 @@ namespace BizHawk.Client.EmuHawk
if (bindingStr != null)
{
//ignore special bindings
if (SpecialBindings.Contains(bindingStr))
{
return;
}
//has special meaning for the binding UI system (clear it).
//you can set it through the special bindings dropdown menu
if (bindingStr == "Escape")
{
EraseMappings();
Increment();
return;
}
//seriously, we refuse to allow you to bind this to anything else.
if (bindingStr == "Alt+F4")
{
return;
}
//ignore special bindings
if (SpecialBindings.Contains(bindingStr))
{
return;
}
if (!IsDuplicate(bindingStr))
{
_bindings[_pos] = bindingStr;