MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / hid_open_path

Function hid_open_path

lib/sdl2/src/hidapi/linux/hid.cpp:158–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bExclusive)
159{
160 hid_device *pDevice = NULL;
161 if ( ( pDevice = (hid_device *)HIDRAW::hid_open_path( path, bExclusive ) ) != NULL )
162 {
163 s_hashDeviceToAPI.Insert( (uintptr_t)pDevice, k_EHIDAPIRAW );
164 return pDevice;
165 }
166 if ( ( pDevice = (hid_device *)HIDUSB::hid_open_path( path, bExclusive ) ) != NULL )
167 {
168 s_hashDeviceToAPI.Insert( (uintptr_t)pDevice, k_EHIDAPIUSB );
169 return pDevice;
170 }
171 return NULL;
172}
173
174int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length)
175{

Callers 12

hid_openFunction · 0.70
hid.cFile · 0.50
hid_openFunction · 0.50
onConnectMethod · 0.50
hid.cFile · 0.50

Calls

no outgoing calls

Tested by 1

onConnectMethod · 0.40