public GameController(IInputDevice directInput, InputMapperBase mapper)
 {
     inputDevice      = directInput;
     this.mapper      = mapper;
     xOutputInterface = createXOutput();
     xInput           = new XOutputDevice(directInput, mapper);
     if (mapper.SelectedDPad == -1 && directInput.DPads.Any())
     {
         mapper.SelectedDPad = 0;
     }
     running = false;
 }
 public GameController(InputMapper mapper)
 {
     this.mapper      = mapper;
     xOutputInterface = CreateXOutput();
     xInput           = new XOutputDevice(mapper);
     if (!string.IsNullOrEmpty(mapper.ForceFeedbackDevice))
     {
         var device = InputDevices.Instance.GetDevices().OfType <DirectDevice>().FirstOrDefault(d => d.UniqueId == mapper.ForceFeedbackDevice);
         if (device != null)
         {
             ForceFeedbackDevice = device;
         }
     }
     running = false;
 }
Exemple #3
0
 public XOutputManager()
 {
     if (VigemDevice.IsAvailable())
     {
         xOutputDevice = new VigemDevice();
     }
     else if (ScpDevice.IsAvailable())
     {
         xOutputDevice = new ScpDevice();
     }
     else
     {
         xOutputDevice = null;
     }
 }