Steam controller input fixes

This commit is contained in:
Garry Newman 2019-04-12 08:29:19 +01:00
parent 7e09c9d56f
commit 6719c6d0a4
2 changed files with 79 additions and 41 deletions

View File

@ -31697,11 +31697,16 @@ public static implicit operator InputAnalogActionData_t ( InputAnalogActionData
[StructLayout( LayoutKind.Sequential, Pack = 8 )] [StructLayout( LayoutKind.Sequential, Pack = 8 )]
internal struct InputMotionData_t internal struct InputMotionData_t
{ {
internal InputSourceMode EMode; // eMode EInputSourceMode internal float RotQuatX; // rotQuatX float
internal float X; // x float internal float RotQuatY; // rotQuatY float
internal float Y; // y float internal float RotQuatZ; // rotQuatZ float
[MarshalAs(UnmanagedType.I1)] internal float RotQuatW; // rotQuatW float
internal bool BActive; // bActive bool internal float PosAccelX; // posAccelX float
internal float PosAccelY; // posAccelY float
internal float PosAccelZ; // posAccelZ float
internal float RotVelX; // rotVelX float
internal float RotVelY; // rotVelY float
internal float RotVelZ; // rotVelZ float
// //
// Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff.
@ -31724,11 +31729,16 @@ internal static int StructSize()
[StructLayout( LayoutKind.Sequential, Pack = 4 )] [StructLayout( LayoutKind.Sequential, Pack = 4 )]
internal struct PackSmall internal struct PackSmall
{ {
internal InputSourceMode EMode; // eMode EInputSourceMode internal float RotQuatX; // rotQuatX float
internal float X; // x float internal float RotQuatY; // rotQuatY float
internal float Y; // y float internal float RotQuatZ; // rotQuatZ float
[MarshalAs(UnmanagedType.I1)] internal float RotQuatW; // rotQuatW float
internal bool BActive; // bActive bool internal float PosAccelX; // posAccelX float
internal float PosAccelY; // posAccelY float
internal float PosAccelZ; // posAccelZ float
internal float RotVelX; // rotVelX float
internal float RotVelY; // rotVelY float
internal float RotVelZ; // rotVelZ float
// //
// Easily convert from PackSmall to InputMotionData_t // Easily convert from PackSmall to InputMotionData_t
@ -31737,10 +31747,16 @@ public static implicit operator InputMotionData_t ( InputMotionData_t.PackSmall
{ {
return new InputMotionData_t() return new InputMotionData_t()
{ {
EMode = d.EMode, RotQuatX = d.RotQuatX,
X = d.X, RotQuatY = d.RotQuatY,
Y = d.Y, RotQuatZ = d.RotQuatZ,
BActive = d.BActive, RotQuatW = d.RotQuatW,
PosAccelX = d.PosAccelX,
PosAccelY = d.PosAccelY,
PosAccelZ = d.PosAccelZ,
RotVelX = d.RotVelX,
RotVelY = d.RotVelY,
RotVelZ = d.RotVelZ,
}; };
} }
} }
@ -31749,9 +31765,8 @@ public static implicit operator InputMotionData_t ( InputMotionData_t.PackSmall
[StructLayout( LayoutKind.Sequential, Pack = 8 )] [StructLayout( LayoutKind.Sequential, Pack = 8 )]
internal struct InputDigitalActionData_t internal struct InputDigitalActionData_t
{ {
internal InputSourceMode EMode; // eMode EInputSourceMode [MarshalAs(UnmanagedType.I1)]
internal float X; // x float internal bool BState; // bState bool
internal float Y; // y float
[MarshalAs(UnmanagedType.I1)] [MarshalAs(UnmanagedType.I1)]
internal bool BActive; // bActive bool internal bool BActive; // bActive bool
@ -31776,9 +31791,8 @@ internal static int StructSize()
[StructLayout( LayoutKind.Sequential, Pack = 4 )] [StructLayout( LayoutKind.Sequential, Pack = 4 )]
internal struct PackSmall internal struct PackSmall
{ {
internal InputSourceMode EMode; // eMode EInputSourceMode [MarshalAs(UnmanagedType.I1)]
internal float X; // x float internal bool BState; // bState bool
internal float Y; // y float
[MarshalAs(UnmanagedType.I1)] [MarshalAs(UnmanagedType.I1)]
internal bool BActive; // bActive bool internal bool BActive; // bActive bool
@ -31789,9 +31803,7 @@ public static implicit operator InputDigitalActionData_t ( InputDigitalActionDa
{ {
return new InputDigitalActionData_t() return new InputDigitalActionData_t()
{ {
EMode = d.EMode, BState = d.BState,
X = d.X,
Y = d.Y,
BActive = d.BActive, BActive = d.BActive,
}; };
} }

View File

@ -44,21 +44,55 @@
"fields": "fields":
[ [
{ {
"fieldname": "eMode", "fieldname": "rotQuatX",
"fieldtype": "EInputSourceMode"
},
{
"fieldname": "x",
"fieldtype": "float" "fieldtype": "float"
}, },
{ {
"fieldname": "y", "fieldname": "rotQuatY",
"fieldtype": "float" "fieldtype": "float"
}, },
{ {
"fieldname": "bActive", "fieldname": "rotQuatZ",
"fieldtype": "bool" "fieldtype": "float"
},
{
"fieldname": "rotQuatW",
"fieldtype": "float"
},
{
"fieldname": "posAccelX",
"fieldtype": "float"
},
{
"fieldname": "posAccelY",
"fieldtype": "float"
},
{
"fieldname": "posAccelZ",
"fieldtype": "float"
},
{
"fieldname": "rotVelX",
"fieldtype": "float"
},
{
"fieldname": "rotVelY",
"fieldtype": "float"
},
{
"fieldname": "rotVelZ",
"fieldtype": "float"
} }
] ]
}, },
@ -67,16 +101,8 @@
"fields": "fields":
[ [
{ {
"fieldname": "eMode", "fieldname": "bState",
"fieldtype": "EInputSourceMode" "fieldtype": "bool"
},
{
"fieldname": "x",
"fieldtype": "float"
},
{
"fieldname": "y",
"fieldtype": "float"
}, },
{ {
"fieldname": "bActive", "fieldname": "bActive",