SDL_hid_get_report_descriptor(3)

SDL_hid_get_report_descriptor3

Get a report descriptor from a hid device.

Usage

#include "SDL3/SDL.h"

int SDL_hid_get_report_descriptor(SDL_hid_device *dev, unsigned char *buf, size_t buf_size);

Header file

Defined in SDL3/SDL_hidapi.h

Overview

User has to provide a preallocated buffer where descriptor will be copied to. The recommended size for a preallocated buffer is 4096 bytes.

Function parameters

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.

Return value

Returns the number of bytes actually copied or -1 on failure; call

SDL_GetError () for more information.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.