Made return value descriptions more consistent across the API
This commit is contained in:
@@ -263,7 +263,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *d
|
||||
* \param serial_number the Serial Number of the device to open (Optionally
|
||||
* NULL).
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
* failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -277,7 +278,8 @@ extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_
|
||||
*
|
||||
* \param path the path name of the device to open.
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
* failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -303,7 +305,8 @@ extern SDL_DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path)
|
||||
* \param data the data to send, including the report number as the first
|
||||
* byte.
|
||||
* \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 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -322,7 +325,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigne
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \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 on failure; call
|
||||
* SDL_GetError() for more information. If no packet was
|
||||
* available to be read within the timeout period, this function
|
||||
* returns 0.
|
||||
*
|
||||
@@ -342,7 +346,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsign
|
||||
* \param length the number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* 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 failure; call
|
||||
* SDL_GetError() for more information. If no packet was
|
||||
* available to be read and the handle is in non-blocking mode, this
|
||||
* function returns 0.
|
||||
*
|
||||
@@ -387,7 +392,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int
|
||||
* byte.
|
||||
* \param length the length in bytes of the data to send, including the report
|
||||
* number.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
* \returns the actual number of bytes written and -1 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -409,7 +415,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev,
|
||||
* \param length the number of bytes to read, including an extra byte for the
|
||||
* report ID. The buffer can be longer 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.
|
||||
* still in the first byte), or -1 on on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -431,7 +438,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev,
|
||||
* \param length the number of bytes to read, including an extra byte for the
|
||||
* report ID. The buffer can be longer 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.
|
||||
* still in the first byte), or -1 on on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -505,8 +513,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev,
|
||||
* Get the device info from a HID device.
|
||||
*
|
||||
* \param dev a device handle returned from SDL_hid_open().
|
||||
* \returns a pointer to the SDL_hid_device_info for this hid_device, or NULL
|
||||
* in the case of failure; call SDL_GetError() for more information.
|
||||
* \returns a pointer to the SDL_hid_device_info for this hid_device or NULL
|
||||
* on failure; call SDL_GetError() for more information.
|
||||
* This struct is valid until the device is closed with
|
||||
* SDL_hid_close().
|
||||
*
|
||||
@@ -523,7 +531,7 @@ extern SDL_DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_get_device_info(SDL_hi
|
||||
* \param dev a device handle returned from SDL_hid_open().
|
||||
* \param buf the buffer to copy descriptor into.
|
||||
* \param buf_size the size of the buffer in bytes.
|
||||
* \returns the number of bytes actually copied, or -1 on error; call
|
||||
* \returns the number of bytes actually copied or -1 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
|
||||
Reference in New Issue
Block a user