Use `int?` in `IJoypadApi.SetAnalog` to match `Set`
This commit is contained in:
parent
d3e439982b
commit
e621b878b8
|
@ -89,12 +89,12 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public void SetAnalog(IReadOnlyDictionary<string, int?> controls, object controller = null)
|
||||
public void SetAnalog(IReadOnlyDictionary<string, int?> controls, int? controller = null)
|
||||
{
|
||||
foreach (var (k, v) in controls) SetAnalog(k, v, controller);
|
||||
}
|
||||
|
||||
public void SetAnalog(string control, int? value = null, object controller = null)
|
||||
public void SetAnalog(string control, int? value = null, int? controller = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace BizHawk.Client.Common
|
|||
void SetFromMnemonicStr(string inputLogEntry);
|
||||
void Set(IReadOnlyDictionary<string, bool> buttons, int? controller = null);
|
||||
void Set(string button, bool? state = null, int? controller = null);
|
||||
void SetAnalog(IReadOnlyDictionary<string, int?> controls, object controller = null);
|
||||
void SetAnalog(string control, int? value = null, object controller = null);
|
||||
void SetAnalog(IReadOnlyDictionary<string, int?> controls, int? controller = null);
|
||||
void SetAnalog(string control, int? value = null, int? controller = null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
[LuaMethodExample("joypad.setanalog( { [ \"Tilt X\" ] = -63, [ \"Tilt Y\" ] = 127 } );")]
|
||||
[LuaMethod("setanalog", "sets the given analog controls to their provided values for the current frame. Note that unlike set() there is only the logic of overriding with the given value.")]
|
||||
public void SetAnalog(LuaTable controls, object controller = null)
|
||||
public void SetAnalog(LuaTable controls, int? controller = null)
|
||||
{
|
||||
var dict = new Dictionary<string, int?>();
|
||||
foreach (var (k, v) in _th.EnumerateEntries<object, object>(controls))
|
||||
|
|
Loading…
Reference in New Issue