Fix an InvalidCastException being thrown when a double is unboxed as a float (#1863)
This commit is contained in:
parent
0962771225
commit
0f7d292101
|
@ -54,7 +54,7 @@ namespace BizHawk.Client.Common
|
|||
public void SetAnalog(LuaTable controls, object controller = null)
|
||||
{
|
||||
var dict = new Dictionary<string, float>();
|
||||
foreach (var k in controls.Keys) dict[k.ToString()] = (float) controls[k];
|
||||
foreach (var k in controls.Keys) dict[k.ToString()] = Convert.ToSingle(controls[k]);
|
||||
APIs.Joypad.SetAnalog(dict, controller);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue