Table of Contents

Class Hint.HidApi

Namespace
Sdl3Sharp
Assembly
Sdl3Sharp.dll

SDL_HINT_HIDAPI_*

public static class Hint.HidApi
Inheritance
Hint.HidApi
Inherited Members

Properties

EnumerateOnlyControllers

Gets a hint to control whether SDL_hid_enumerate() enumerates all HID devices or only controllers

public static Hint EnumerateOnlyControllers { get; }

Property Value

Hint

A hint to control whether SDL_hid_enumerate() enumerates all HID devices or only controllers

Remarks

The hint can be set to the following values:

  • "0"SDL_hid_enumerate() will enumerate all HID devices
  • "1"SDL_hid_enumerate() will only enumerate controllers (default)

By default SDL will only enumerate controllers, to reduce risk of hanging or crashing on devices with bad drivers and avoiding macOS keyboard capture permission prompts.

This hint can be set anytime.

See Also

IgnoreDevices

Gets a hint containing a list of devices to ignore in SDL_hid_enumerate()

public static Hint IgnoreDevices { get; }

Property Value

Hint

A hint containing a list of devices to ignore in SDL_hid_enumerate()

Remarks

The format of the hint is a comma separated list of USB VID/PID pairs in hexadecimal form, e.g. "0xAAAA/0xBBBB,0xCCCC/0xDDDD".

For example, to ignore the Shanwan DS3 controller and any Valve controller, you might use the string "0x2563/0x0523,0x28de/0x0000".

This hint can be set anytime.

See Also

LibUsb

Gets a hint to control whether HIDAPI uses libusb for device access

public static Hint LibUsb { get; }

Property Value

Hint

A hint to control whether HIDAPI uses libusb for device access

Remarks

By default libusb will only be used for a few devices that require direct USB access, and this can be controlled with LibUsbWhitelist.

The hint can be set to the following values:

  • "0"HIDAPI will not use libusb for device access
  • "1"HIDAPI will use libusb for device access if available (default)

This hint should be set before SDL is initialized.

See Also

LibUsbWhitelist

Gets a hint to control whether HIDAPI uses libusb only for whitelisted devices

public static Hint LibUsbWhitelist { get; }

Property Value

Hint

A hint to control whether HIDAPI uses libusb only for whitelisted devices

Remarks

By default libusb will only be used for a few devices that require direct USB access.

The hint can be set to the following values:

  • "0"HIDAPI will use libusb for all device access
  • "1"HIDAPI will use libusb only for whitelisted devices (default)

This hint should be set before SDL is initialized.

See Also

UDev

Gets a hint to control whether HIDAPI uses udev for device detection

public static Hint UDev { get; }

Property Value

Hint

A hint to control whether HIDAPI uses udev for device detection

Remarks

The hint can be set to the following values:

  • "0"HIDAPI will poll for device changes
  • "1"HIDAPI will use udev for device detection (default)

This hint should be set before SDL is initialized.

See Also