explicitly unset sticky axes
there should not be a function that blindly unsets both axes and button, make it explicit
This commit is contained in:
parent
84f774aa9c
commit
5a4f093d50
|
@ -62,12 +62,6 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unset(string button)
|
|
||||||
{
|
|
||||||
_buttonHolds.Remove(button);
|
|
||||||
_axisHolds.Remove(button);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsSticky(string button) => _buttonHolds.Contains(button);
|
public bool IsSticky(string button) => _buttonHolds.Contains(button);
|
||||||
|
|
||||||
public void ClearStickies()
|
public void ClearStickies()
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
_stickyXorAdapter.Unset(Name);
|
_stickyXorAdapter.SetAxis(Name, null);
|
||||||
IsSet = false;
|
IsSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,8 +138,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
AnalogStick.Clear(fromCallback: true);
|
AnalogStick.Clear(fromCallback: true);
|
||||||
SetNumericsFromAnalog();
|
SetNumericsFromAnalog();
|
||||||
_stickyXorAdapter.Unset(AnalogStick.XName);
|
_stickyXorAdapter.SetAxis(AnalogStick.XName, null);
|
||||||
_stickyXorAdapter.Unset(AnalogStick.YName);
|
_stickyXorAdapter.SetAxis(AnalogStick.YName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clear() => AnalogStick.Clear();
|
public void Clear() => AnalogStick.Clear();
|
||||||
|
|
|
@ -58,8 +58,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
_stickyXorAdapter.Unset(XName);
|
_stickyXorAdapter.SetAxis(XName, null);
|
||||||
_stickyXorAdapter.Unset(YName);
|
_stickyXorAdapter.SetAxis(YName, null);
|
||||||
_overrideX = null;
|
_overrideX = null;
|
||||||
_overrideY = null;
|
_overrideY = null;
|
||||||
_isSet = false;
|
_isSet = false;
|
||||||
|
|
Loading…
Reference in New Issue