コード例 #1
0
        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);
            }
        }
コード例 #2
0
ファイル: Ds4.cs プロジェクト: evilC/AHK-ViGEm-Bus
 public void SetAxisState(DualShock4Axes axis, byte state)
 {
     _report.SetAxis(axis, state);
 }