示例#1
0
 internal VidPidInfo(int vid, int pid, string name = "Generic DS4", VidPidFeatureSet featureSet = VidPidFeatureSet.DefaultDS4)
 {
     this.vid        = vid;
     this.pid        = pid;
     this.name       = name;
     this.featureSet = featureSet;
 }
示例#2
0
        public static DS4Device CreateDevice(InputDeviceType tempType,
                                             HidDevice hidDevice, string disName, VidPidFeatureSet featureSet = VidPidFeatureSet.DefaultDS4)
        {
            DS4Device temp = null;

            switch (tempType)
            {
            case InputDeviceType.DS4:
                temp = new DS4Device(hidDevice, disName, featureSet);
                break;

            case InputDeviceType.SwitchPro:
                temp = new SwitchProDevice(hidDevice, disName, featureSet);
                break;

            case InputDeviceType.JoyConL:
            case InputDeviceType.JoyConR:
                temp = new JoyConDevice(hidDevice, disName, featureSet);
                break;

            case InputDeviceType.DualSense:
                temp = new DualSenseDevice(hidDevice, disName, featureSet);
                break;
            }

            return(temp);
        }
示例#3
0
        internal VidPidInfo(int vid, int pid, string name = "Generic DS4", InputDeviceType inputDevType = InputDeviceType.DS4,
                            VidPidFeatureSet featureSet   = VidPidFeatureSet.DefaultDS4, CheckConnectionDelegate checkConnection = null)
        {
            this.vid          = vid;
            this.pid          = pid;
            this.name         = name;
            this.inputDevType = inputDevType;
            this.featureSet   = featureSet;

            if (checkConnection == null)
            {
                this.checkConnection = DS4Device.HidConnectionType;
            }
            else
            {
                this.checkConnection = checkConnection;
            }
        }