Пример #1
0
        /// <summary>
        /// Constructor for this class, defines the individual controller.
        /// </summary>
        public DInputController(SharpDX.DirectInput.DirectInput directInput, Guid deviceGuid) : base(directInput, deviceGuid)
        {
            // Instantiate the remapper.
            Remapper = new Remapper(Remapper.InputDeviceType.DirectInput, this);

            // Get the controller key binding.
            Remapper.GetMappings();
        }
        /// <summary>
        /// Constructor for this class, defines the individual controller.
        /// </summary>
        /// <param name="controllerId">Specifies the XInput controller port for the controller to be created.</param>
        public XInputController(int controllerId)
        {
            // Create controller instance and assign controller port.
            Controller   = new Controller((UserIndex)controllerId);
            ControllerId = controllerId;

            // Instantiate the remapper.
            Remapper = new Remapper(Remapper.InputDeviceType.XInput, this);

            // Get the controller key binding.
            Remapper.GetMappings();
        }