MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / hid_close

Function hid_close

deps/SDL2/src/hidapi/android/hid.cpp:1105–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103
1104
1105void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device)
1106{
1107 if ( device )
1108 {
1109 LOGV( "hid_close id=%d", device->m_nId );
1110 hid_mutex_guard r( &g_DevicesRefCountMutex );
1111 LOGD("Decrementing device %d (%p), refCount = %d\n", device->m_nId, device, device->m_nDeviceRefCount - 1);
1112 if ( --device->m_nDeviceRefCount == 0 )
1113 {
1114 hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
1115 if ( pDevice )
1116 {
1117 pDevice->Close( true );
1118 }
1119 else
1120 {
1121 delete device;
1122 }
1123 LOGD("Deleted device %p\n", device);
1124 }
1125 }
1126}
1127
1128int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen)
1129{

Callers

nothing calls this directly

Calls 2

FindDeviceFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected