Example #1
0
 public NpadController(
     bool enabled,
     int index,
     float deadzone,
     float triggerThreshold,
     NpadControllerLeft leftJoycon,
     NpadControllerRight rightJoycon)
 {
     Enabled          = enabled;
     Index            = index;
     Deadzone         = deadzone;
     TriggerThreshold = triggerThreshold;
     LeftJoycon       = leftJoycon;
     RightJoycon      = rightJoycon;
 }
Example #2
0
        public NpadController(
            bool enabled,
            int index,
            float deadzone,
            float triggerThreshold,
            NpadControllerLeft left,
            NpadControllerRight right)
        {
            Enabled          = enabled;
            Index            = index;
            Deadzone         = deadzone;
            TriggerThreshold = triggerThreshold;
            Left             = left;
            Right            = right;

            //Unmapped controllers are problematic, skip them
            if (GamePad.GetName(index) == "Unmapped Controller")
            {
                Enabled = false;
            }
        }