A fix to joypad.set() - passing null will clear a button
This commit is contained in:
parent
ddb9d6ccf2
commit
b93c1414c1
|
@ -121,7 +121,8 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
else
|
||||
{
|
||||
Global.ForceOffAdaptor.SetSticky(button.ToString(), false);
|
||||
Global.StickyXORAdapter.Unset(button.ToString());
|
||||
Global.ForceOffAdaptor.Unset(button.ToString());
|
||||
}
|
||||
}
|
||||
else // Inverse
|
||||
|
|
|
@ -244,6 +244,11 @@ namespace BizHawk.Client.Common
|
|||
this.StickySet.Remove(button);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unset(string button)
|
||||
{
|
||||
StickySet.Remove(button);
|
||||
}
|
||||
}
|
||||
|
||||
public class StickyXorAdapter : IController
|
||||
|
@ -315,6 +320,11 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public void Unset(string button)
|
||||
{
|
||||
stickySet.Remove(button);
|
||||
}
|
||||
|
||||
public bool IsSticky(string button)
|
||||
{
|
||||
return stickySet.Contains(button);
|
||||
|
|
Loading…
Reference in New Issue