Beispiel #1
0
        /// <summary>
        /// If the associated controller is not found, it remaps it to the first connected device.
        /// </summary>
        public static void ResolveControllerAxis(ControllerAxis axis)
        {
            var controller = Controller.Get(axis.GUID);

            if (controller == null && Controller.NumDevices > 0)
            {
                controller = Controller.Get(0);
                axis.GUID  = controller.GUID;
                axis.Axis %= controller.NumAxes;
            }
        }
Beispiel #2
0
        internal override InputAxis Clone()
        {
            var clone = new ControllerAxis(Name);

            clone.GUID        = GUID;
            clone.Axis        = Axis;
            clone.Sensitivity = Sensitivity;
            clone.Curvature   = Curvature;
            clone.Deadzone    = Deadzone;
            clone.OffsetX     = OffsetX;
            clone.OffsetY     = OffsetY;
            clone.Invert      = Invert;
            clone.Smooth      = Smooth;
            return(clone);
        }