some xinput stuff, can't test it here
This commit is contained in:
parent
77a4eb098f
commit
a5ec2f0f6d
|
@ -62,6 +62,17 @@ namespace BizHawk.MultiClient
|
|||
state = controller.GetState();
|
||||
}
|
||||
|
||||
public IEnumerable<Tuple<string, float>> GetFloats()
|
||||
{
|
||||
var g = state.Gamepad;
|
||||
const float f = 3.2768f;
|
||||
yield return new Tuple<string, float>("LeftThumbX", g.LeftThumbX / f);
|
||||
yield return new Tuple<string, float>("LeftThumbY", g.LeftThumbY / f);
|
||||
yield return new Tuple<string, float>("RightThumbX", g.RightThumbX / f);
|
||||
yield return new Tuple<string, float>("RightThumbY", g.RightThumbY / f);
|
||||
yield break;
|
||||
}
|
||||
|
||||
public int NumButtons { get; private set; }
|
||||
|
||||
private readonly List<string> names = new List<string>();
|
||||
|
|
|
@ -298,6 +298,8 @@ namespace BizHawk.MultiClient
|
|||
string xname = "X" + (i + 1) + " ";
|
||||
for (int b = 0; b < pad.NumButtons; b++)
|
||||
HandleButton(xname + pad.ButtonName(b), pad.Pressed(b));
|
||||
foreach (var sv in pad.GetFloats())
|
||||
FloatValues.Add(new Tuple<string,float>(xname + sv.Item1, sv.Item2));
|
||||
}
|
||||
|
||||
//analyze joysticks
|
||||
|
|
Loading…
Reference in New Issue