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

Function hid_read_timeout

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

TODO: Implement timeout?

Source from the content-addressed store, hash-verified

1044
1045// TODO: Implement timeout?
1046int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds)
1047{
1048 if ( device )
1049 {
1050// LOGV( "hid_read_timeout id=%d length=%u timeout=%d", device->m_nId, length, milliseconds );
1051 hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
1052 if ( pDevice )
1053 {
1054 return pDevice->GetInput( data, length );
1055 }
1056 LOGV( "controller was disconnected" );
1057 }
1058 return -1; // Controller was disconnected
1059}
1060
1061// TODO: Implement blocking
1062int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length)

Callers 1

hid_readFunction · 0.70

Calls 2

FindDeviceFunction · 0.85
GetInputMethod · 0.80

Tested by

no test coverage detected