Skip to content

Commit e621b87

Browse files
committed
Use int? in IJoypadApi.SetAnalog to match Set
1 parent d3e4399 commit e621b87

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/BizHawk.Client.Common/Api/Classes/JoypadApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ public void Set(string button, bool? state = null, int? controller = null)
8989
}
9090
}
9191

92-
public void SetAnalog(IReadOnlyDictionary<string, int?> controls, object controller = null)
92+
public void SetAnalog(IReadOnlyDictionary<string, int?> controls, int? controller = null)
9393
{
9494
foreach (var (k, v) in controls) SetAnalog(k, v, controller);
9595
}
9696

97-
public void SetAnalog(string control, int? value = null, object controller = null)
97+
public void SetAnalog(string control, int? value = null, int? controller = null)
9898
{
9999
try
100100
{

src/BizHawk.Client.Common/Api/Interfaces/IJoypadApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public interface IJoypadApi : IExternalApi
1010
void SetFromMnemonicStr(string inputLogEntry);
1111
void Set(IReadOnlyDictionary<string, bool> buttons, int? controller = null);
1212
void Set(string button, bool? state = null, int? controller = null);
13-
void SetAnalog(IReadOnlyDictionary<string, int?> controls, object controller = null);
14-
void SetAnalog(string control, int? value = null, object controller = null);
13+
void SetAnalog(IReadOnlyDictionary<string, int?> controls, int? controller = null);
14+
void SetAnalog(string control, int? value = null, int? controller = null);
1515
}
1616
}

src/BizHawk.Client.Common/lua/CommonLibs/JoypadLuaLibrary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void Set(LuaTable buttons, int? controller = null)
4343

4444
[LuaMethodExample("joypad.setanalog( { [ \"Tilt X\" ] = -63, [ \"Tilt Y\" ] = 127 } );")]
4545
[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.")]
46-
public void SetAnalog(LuaTable controls, object controller = null)
46+
public void SetAnalog(LuaTable controls, int? controller = null)
4747
{
4848
var dict = new Dictionary<string, int?>();
4949
foreach (var (k, v) in _th.EnumerateEntries<object, object>(controls))

0 commit comments

Comments
 (0)