Get a report descriptor from a HID device.
Defined in <SDL3/SDL_hidapi.h>
dev | A device handle returned from SDL_hid_open(). |
buf | The buffer to copy descriptor into. |
buf_size | The size of the buffer in bytes. |
Returns the number of bytes actually copied, or -1 on error; call SDL_GetError() for more information.
User has to provide a preallocated buffer where descriptor will be copied to. The recommended size for a preallocated buffer is 4096 bytes.
This function is available since SDL 3.0.0.