public virtual IList <GamepadDevice> AvailableDevices() { IList <GamepadDevice> result = new List <GamepadDevice>(); foreach (var deviceInstance in _directInput.GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly)) { GamepadDevice device = new GamepadDevice { Guid = deviceInstance.InstanceGuid, Name = deviceInstance.InstanceName }; result.Add(device); } return(result); }
public void Select(GamepadDevice device) { _currentDevice = device; }