private UnknownDeviceControl ListenForControl(BindingListenOptions listenOptions, InputDevice device)
 {
     if (device.IsUnknown)
     {
         UnknownDeviceControl firstPressedButton = device.GetFirstPressedButton();
         if ((bool)firstPressedButton)
         {
             return(firstPressedButton);
         }
         UnknownDeviceControl firstPressedAnalog = device.GetFirstPressedAnalog();
         if ((bool)firstPressedAnalog)
         {
             return(firstPressedAnalog);
         }
     }
     return(UnknownDeviceControl.None);
 }
Ejemplo n.º 2
0
        UnknownDeviceControl ListenForControl(BindingListenOptions listenOptions, InputDevice device)
        {
            if (device.IsUnknown)
            {
                var button = device.GetFirstPressedButton();
                if (button)
                {
                    return(button);
                }

                var analog = device.GetFirstPressedAnalog();
                if (analog)
                {
                    return(analog);
                }
            }

            return(UnknownDeviceControl.None);
        }