Пример #1
0
        /// <summary>
        /// Gets the joystick information.
        /// </summary>
        /// <param name="joystick">Index of the joystick.</param>
        /// <returns>Structure containing joystick information.</returns>
        public static Identification GetIdentification(uint joystick)
        {
            IdentificationMarshalData identification    = sfJoystick_getIdentification(joystick);
            Identification            retIdentification = new Identification();


            return(retIdentification);
        }
Пример #2
0
        ////////////////////////////////////////////////////////////
        /// <summary>
        /// Get the joystick information
        /// </summary>
        /// <param name="joystick">Index of the joystick</param>
        /// <returns>Structure containing joystick information</returns>
        ////////////////////////////////////////////////////////////
        public static Identification GetIdentification(uint joystick)
        {
            IdentificationMarshalData identification    = sfJoystick_getIdentification(joystick);
            Identification            retIdentification = new Identification();

            retIdentification.Name      = Marshal.PtrToStringAnsi(identification.Name);
            retIdentification.VendorId  = identification.VendorId;
            retIdentification.ProductId = identification.ProductId;

            return(retIdentification);
        }
Пример #3
0
 internal Identification(IdentificationMarshalData i)
 {
     Name      = Marshal.PtrToStringAnsi(i.Name);
     VendorId  = i.VendorId;
     ProductId = i.ProductId;
 }