Exemple #1
0
 public virtual bool IsConnected(int dwUserIndex)
 {
     if (impl == null || impl.XInputGetState == null)
     {
         return(false);
     }
     XInputPlugin.XINPUT_STATE state = new XInputPlugin.XINPUT_STATE();
     return(impl.XInputGetState(dwUserIndex, ref state) == 0);
 }
Exemple #2
0
        public XboxController(XboxControllerManager manager, string name, int dwUserIndex) : base(name)
        {
            this.manager     = manager;
            this.dwUserIndex = dwUserIndex;

            xinputState              = new XInputPlugin.XINPUT_STATE();
            xinputVibration          = new XInputPlugin.XINPUT_VIBRATION();
            xinputBatteryInformation = new XInputPlugin.XINPUT_BATTERY_INFORMATION();
            //
            if (this.manager.inputTransforms != null && this.manager.inputTransforms.Length > 1)
            {
                inputTransform = this.manager.inputTransforms[0];
            }
        }