TODO: Implement timeout?
| 1044 | |
| 1045 | // TODO: Implement timeout? |
| 1046 | int 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 |
| 1062 | int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length) |
no test coverage detected