|  |  | @@ -116,12 +116,11 @@ typedef struct SDL_hid_device_info | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Initialize the HIDAPI library. |  |  |  |  * Initialize the HIDAPI library. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * This function initializes the HIDAPI library. Calling it is not |  |  |  |  * This function initializes the HIDAPI library. Calling it is not strictly | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * strictly necessary, as it will be called automatically by |  |  |  |  * necessary, as it will be called automatically by SDL_hid_enumerate() and | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * SDL_hid_enumerate() and any of the SDL_hid_open_*() functions |  |  |  |  * any of the SDL_hid_open_*() functions if it is needed. This function should | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * if it is needed. This function should be called at the beginning |  |  |  |  * be called at the beginning of execution however, if there is a chance of | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * of execution however, if there is a chance of HIDAPI handles |  |  |  |  * HIDAPI handles being opened by different threads simultaneously. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * being opened by different threads simultaneously. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -132,9 +131,8 @@ extern DECLSPEC int SDLCALL SDL_hid_init(void); | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Finalize the HIDAPI library. |  |  |  |  * Finalize the HIDAPI library. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * This function frees all of the static data associated with |  |  |  |  * This function frees all of the static data associated with HIDAPI. It | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * HIDAPI. It should be called at the end of execution to avoid |  |  |  |  * should be called at the end of execution to avoid memory leaks. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * memory leaks. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -145,20 +143,18 @@ extern DECLSPEC int SDLCALL SDL_hid_exit(void); | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Enumerate the HID Devices. |  |  |  |  * Enumerate the HID Devices. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * This function returns a linked list of all the HID devices |  |  |  |  * This function returns a linked list of all the HID devices attached to the | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * attached to the system which match vendor_id and product_id. |  |  |  |  * system which match vendor_id and product_id. If `vendor_id` is set to 0 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * If `vendor_id` is set to 0 then any vendor matches. |  |  |  |  * then any vendor matches. If `product_id` is set to 0 then any product | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * If `product_id` is set to 0 then any product matches. |  |  |  |  * matches. If `vendor_id` and `product_id` are both set to 0, then all HID | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * If `vendor_id` and `product_id` are both set to 0, then |  |  |  |  * devices will be returned. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * all HID devices will be returned. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param vendor_id The Vendor ID (VID) of the types of device to open. |  |  |  |  * \param vendor_id The Vendor ID (VID) of the types of device to open. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param product_id The Product ID (PID) of the types of device to open. |  |  |  |  * \param product_id The Product ID (PID) of the types of device to open. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * \returns a pointer to a linked list of type SDL_hid_device_info, containing | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns a pointer to a linked list of type SDL_hid_device_info, |  |  |  |  *          information about the HID devices attached to the system, or NULL | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *          containing information about the HID devices attached to the |  |  |  |  *          in the case of failure. Free this linked list by calling | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *          system, or NULL in the case of failure. Free this linked list |  |  |  |  *          SDL_hid_free_enumeration(). | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *          by calling SDL_hid_free_enumeration(). |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -170,7 +166,7 @@ extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short v | 
			
		
	
		
		
			
				
					
					|  |  |  |  * This function frees a linked list created by SDL_hid_enumerate(). |  |  |  |  * This function frees a linked list created by SDL_hid_enumerate(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param devs Pointer to a list of struct_device returned from |  |  |  |  * \param devs Pointer to a list of struct_device returned from | 
			
		
	
		
		
			
				
					
					|  |  |  |  *           SDL_hid_enumerate(). |  |  |  |  *             SDL_hid_enumerate(). | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs); |  |  |  | extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |  | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -210,25 +206,23 @@ SDL_hid_device * SDL_hid_open_path(const char *path, int bExclusive /* = false * | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Write an Output report to a HID device. |  |  |  |  * Write an Output report to a HID device. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * The first byte of `data` must contain the Report ID. For |  |  |  |  * The first byte of `data` must contain the Report ID. For devices which only | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * devices which only support a single report, this must be set |  |  |  |  * support a single report, this must be set to 0x0. The remaining bytes | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * to 0x0. The remaining bytes contain the report data. Since |  |  |  |  * contain the report data. Since the Report ID is mandatory, calls to | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * the Report ID is mandatory, calls to SDL_hid_write() will always |  |  |  |  * SDL_hid_write() will always contain one more byte than the report contains. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * contain one more byte than the report contains. For example, |  |  |  |  * For example, if a hid report is 16 bytes long, 17 bytes must be passed to | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * if a hid report is 16 bytes long, 17 bytes must be passed to |  |  |  |  * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * SDL_hid_write(), the Report ID (or 0x0, for devices with a |  |  |  |  * followed by the report data (16 bytes). In this example, the length passed | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * single report), followed by the report data (16 bytes). In |  |  |  |  * in would be 17. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * this example, the length passed in would be 17. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * SDL_hid_write() will send the data on the first OUT endpoint, if |  |  |  |  * SDL_hid_write() will send the data on the first OUT endpoint, if one | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * one exists. If it does not, it will send the data through |  |  |  |  * exists. If it does not, it will send the data through the Control Endpoint | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * the Control Endpoint (Endpoint 0). |  |  |  |  * (Endpoint 0). | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param data The data to send, including the report number as |  |  |  |  * \param data The data to send, including the report number as the first | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     the first byte. |  |  |  |  *             byte. | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * \param length The length in bytes of the data to send. |  |  |  |  * \param length The length in bytes of the data to send. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns the actual number of bytes written and -1 on error. |  |  |  |  * \returns the actual number of bytes written and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -238,19 +232,19 @@ extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned ch | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Read an Input report from a HID device with timeout. |  |  |  |  * Read an Input report from a HID device with timeout. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Input reports are returned |  |  |  |  * Input reports are returned to the host through the INTERRUPT IN endpoint. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * to the host through the INTERRUPT IN endpoint. The first byte will |  |  |  |  * The first byte will contain the Report number if the device uses numbered | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * contain the Report number if the device uses numbered reports. |  |  |  |  * reports. | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param data A buffer to put the read data into. |  |  |  |  * \param data A buffer to put the read data into. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param length The number of bytes to read. For devices with |  |  |  |  * \param length The number of bytes to read. For devices with multiple | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     multiple reports, make sure to read an extra byte for |  |  |  |  *               reports, make sure to read an extra byte for the report | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     the report number. |  |  |  |  *               number. | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * \param milliseconds timeout in milliseconds or -1 for blocking wait. |  |  |  |  * \param milliseconds timeout in milliseconds or -1 for blocking wait. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * \returns the actual number of bytes read and -1 on error. If no packet was | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns the actual number of bytes read and -1 on error. |  |  |  |  *          available to be read within the timeout period, this function | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             If no packet was available to be read within the timeout period, this function returns 0. |  |  |  |  *          returns 0. | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -259,18 +253,18 @@ extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned c | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Read an Input report from a HID device. |  |  |  |  * Read an Input report from a HID device. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Input reports are returned |  |  |  |  * Input reports are returned to the host through the INTERRUPT IN endpoint. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * to the host through the INTERRUPT IN endpoint. The first byte will |  |  |  |  * The first byte will contain the Report number if the device uses numbered | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * contain the Report number if the device uses numbered reports. |  |  |  |  * reports. | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param data A buffer to put the read data into. |  |  |  |  * \param data A buffer to put the read data into. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param length The number of bytes to read. For devices with |  |  |  |  * \param length The number of bytes to read. For devices with multiple | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     multiple reports, make sure to read an extra byte for |  |  |  |  *               reports, make sure to read an extra byte for the report | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     the report number. |  |  |  |  *               number. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * \returns the actual number of bytes read and -1 on error. If no packet was | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns the actual number of bytes read and -1 on error. |  |  |  |  *          available to be read and the handle is in non-blocking mode, this | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *          If no packet was available to be read and the handle is in non-blocking mode, this function returns 0. |  |  |  |  *          function returns 0. | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -279,18 +273,15 @@ extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *dat | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Set the device handle to be non-blocking. |  |  |  |  * Set the device handle to be non-blocking. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * In non-blocking mode calls to SDL_hid_read() will return |  |  |  |  * In non-blocking mode calls to SDL_hid_read() will return immediately with a | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * immediately with a value of 0 if there is no data to be |  |  |  |  * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * read. In blocking mode, SDL_hid_read() will wait (block) until |  |  |  |  * will wait (block) until there is data to read before returning. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * there is data to read before returning. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Nonblocking can be turned on and off at any time. |  |  |  |  * Nonblocking can be turned on and off at any time. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param nonblock enable or not the nonblocking reads |  |  |  |  * \param nonblock enable or not the nonblocking reads - 1 to enable | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *  - 1 to enable nonblocking |  |  |  |  *                 nonblocking - 0 to disable nonblocking. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *  - 0 to disable nonblocking. |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -300,25 +291,21 @@ extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int non | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Send a Feature report to the device. |  |  |  |  * Send a Feature report to the device. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Feature reports are sent over the Control endpoint as a |  |  |  |  * Feature reports are sent over the Control endpoint as a Set_Report | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * Set_Report transfer. The first byte of `data` must |  |  |  |  * transfer. The first byte of `data` must contain the Report ID. For devices | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * contain the Report ID. For devices which only support a |  |  |  |  * which only support a single report, this must be set to 0x0. The remaining | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * single report, this must be set to 0x0. The remaining bytes |  |  |  |  * bytes contain the report data. Since the Report ID is mandatory, calls to | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * contain the report data. Since the Report ID is mandatory, |  |  |  |  * SDL_hid_send_feature_report() will always contain one more byte than the | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * calls to SDL_hid_send_feature_report() will always contain one |  |  |  |  * report contains. For example, if a hid report is 16 bytes long, 17 bytes | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * more byte than the report contains. For example, if a hid |  |  |  |  * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * report is 16 bytes long, 17 bytes must be passed to |  |  |  |  * devices which do not use numbered reports), followed by the report data (16 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * SDL_hid_send_feature_report(): the Report ID (or 0x0, for |  |  |  |  * bytes). In this example, the length passed in would be 17. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * devices which do not use numbered reports), followed by the |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * report data (16 bytes). In this example, the length passed |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * in would be 17. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param data The data to send, including the report number as |  |  |  |  * \param data The data to send, including the report number as the first | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     the first byte. |  |  |  |  *             byte. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * \param length The length in bytes of the data to send, including |  |  |  |  * \param length The length in bytes of the data to send, including the report | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     the report number. |  |  |  |  *               number. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * \returns the actual number of bytes written and -1 on error. |  |  |  |  * \returns the actual number of bytes written and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -328,23 +315,20 @@ extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, con | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Get a feature report from a HID device. |  |  |  |  * Get a feature report from a HID device. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Set the first byte of `data` to the Report ID of the |  |  |  |  * Set the first byte of `data` to the Report ID of the report to be read. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * report to be read. Make sure to allow space for this |  |  |  |  * Make sure to allow space for this extra byte in `data`. Upon return, the | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * extra byte in `data`. Upon return, the first byte will |  |  |  |  * first byte will still contain the Report ID, and the report data will start | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * still contain the Report ID, and the report data will |  |  |  |  * in data[1]. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * start in data[1]. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param data A buffer to put the read data into, including |  |  |  |  * \param data A buffer to put the read data into, including the Report ID. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     the Report ID. Set the first byte of `data` to the |  |  |  |  *             Set the first byte of `data` to the Report ID of the report to | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     Report ID of the report to be read, or set it to zero |  |  |  |  *             be read, or set it to zero if your device does not use numbered | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     if your device does not use numbered reports. |  |  |  |  *             reports. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * \param length The number of bytes to read, including an |  |  |  |  * \param length The number of bytes to read, including an extra byte for the | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     extra byte for the report ID. The buffer can be longer |  |  |  |  *               report ID. The buffer can be longer than the actual report. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  *     than the actual report. |  |  |  |  * \returns the number of bytes read plus one for the report ID (which is | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  *          still in the first byte), or -1 on error. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns the number of bytes read plus one for the report ID |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  *          (which is still in the first byte), or -1 on error. |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -363,7 +347,6 @@ extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev); | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param string A wide string buffer to put the data into. |  |  |  |  * \param string A wide string buffer to put the data into. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. |  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -376,7 +359,6 @@ extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param string A wide string buffer to put the data into. |  |  |  |  * \param string A wide string buffer to put the data into. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. |  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -389,7 +371,6 @@ extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wcha | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param dev A device handle returned from SDL_hid_open(). |  |  |  |  * \param dev A device handle returned from SDL_hid_open(). | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param string A wide string buffer to put the data into. |  |  |  |  * \param string A wide string buffer to put the data into. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. |  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  | @@ -403,7 +384,6 @@ extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param string_index The index of the string to get. |  |  |  |  * \param string_index The index of the string to get. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param string A wide string buffer to put the data into. |  |  |  |  * \param string A wide string buffer to put the data into. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. |  |  |  |  * \param maxlen The length of the buffer in multiples of wchar_t. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \returns 0 on success and -1 on error. |  |  |  |  * \returns 0 on success and -1 on error. | 
			
		
	
		
		
			
				
					
					|  |  |  |  * |  |  |  |  * | 
			
		
	
		
		
			
				
					
					|  |  |  |  * \since This function is available since SDL 2.0.18. |  |  |  |  * \since This function is available since SDL 2.0.18. | 
			
		
	
	
		
		
			
				
					
					|  |  |   |