public static void SetAxis(this DualShock4Report report, DualShock4Axes axis, byte value) { switch (axis) { case DualShock4Axes.LeftTrigger: report.LeftTrigger = value; break; case DualShock4Axes.RightTrigger: report.RightTrigger = value; break; case DualShock4Axes.LeftThumbX: report.LeftThumbX = value; break; case DualShock4Axes.LeftThumbY: report.LeftThumbY = value; break; case DualShock4Axes.RightThumbX: report.RightThumbX = value; break; case DualShock4Axes.RightThumbY: report.RightThumbY = value; break; default: throw new ArgumentOutOfRangeException(nameof(axis), axis, null); } }
public void SetAxisState(DualShock4Axes axis, byte state) { _report.SetAxis(axis, state); }