include/SDL_joystick.h
changeset 10595 9da2701eeb4a
parent 10213 f97a7faf0b58
child 10636 e692b9291c81
     1.1 --- a/include/SDL_joystick.h	Thu Nov 10 12:07:34 2016 -0500
     1.2 +++ b/include/SDL_joystick.h	Thu Nov 10 17:19:34 2016 -0800
     1.3 @@ -96,6 +96,33 @@
     1.4  extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
     1.5  
     1.6  /**
     1.7 + *  Return the GUID for the joystick at this index
     1.8 + *  This can be called before any joysticks are opened.
     1.9 + */
    1.10 +extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
    1.11 +
    1.12 +/**
    1.13 + *  Get the USB vendor ID of a joystick, if available.
    1.14 + *  This can be called before any joysticks are opened.
    1.15 + *  If the vendor ID isn't available this function returns 0.
    1.16 + */
    1.17 +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
    1.18 +
    1.19 +/**
    1.20 + *  Get the USB product ID of a joystick, if available.
    1.21 + *  This can be called before any joysticks are opened.
    1.22 + *  If the product ID isn't available this function returns 0.
    1.23 + */
    1.24 +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
    1.25 +
    1.26 +/**
    1.27 + *  Get the product version of a joystick, if available.
    1.28 + *  This can be called before any joysticks are opened.
    1.29 + *  If the product version isn't available this function returns 0.
    1.30 + */
    1.31 +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
    1.32 +
    1.33 +/**
    1.34   *  Open a joystick for use.
    1.35   *  The index passed as an argument refers to the N'th joystick on the system.
    1.36   *  This index is not the value which will identify this joystick in future
    1.37 @@ -118,23 +145,36 @@
    1.38  extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
    1.39  
    1.40  /**
    1.41 - *  Return the GUID for the joystick at this index
    1.42 - */
    1.43 -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
    1.44 -
    1.45 -/**
    1.46   *  Return the GUID for this opened joystick
    1.47   */
    1.48  extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
    1.49  
    1.50  /**
    1.51 + *  Get the USB vendor ID of an opened joystick, if available.
    1.52 + *  If the vendor ID isn't available this function returns 0.
    1.53 + */
    1.54 +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);
    1.55 +
    1.56 +/**
    1.57 + *  Get the USB product ID of an opened joystick, if available.
    1.58 + *  If the product ID isn't available this function returns 0.
    1.59 + */
    1.60 +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);
    1.61 +
    1.62 +/**
    1.63 + *  Get the product version of an opened joystick, if available.
    1.64 + *  If the product version isn't available this function returns 0.
    1.65 + */
    1.66 +extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);
    1.67 +
    1.68 +/**
    1.69   *  Return a string representation for this guid. pszGUID must point to at least 33 bytes
    1.70   *  (32 for the string plus a NULL terminator).
    1.71   */
    1.72  extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
    1.73  
    1.74  /**
    1.75 - *  convert a string into a joystick formatted guid
    1.76 + *  Convert a string into a joystick guid
    1.77   */
    1.78  extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
    1.79