/// <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); }
//////////////////////////////////////////////////////////// /// <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); }
internal Identification(IdentificationMarshalData i) { Name = Marshal.PtrToStringAnsi(i.Name); VendorId = i.VendorId; ProductId = i.ProductId; }