mirror of
https://github.com/RPCS3/hidapi.git
synced 2026-07-19 13:34:37 -04:00
Fix return value in hid_write_control
This won't really fix anything, but might spare us some future headaches.
This commit is contained in:
+2
-3
@@ -938,17 +938,16 @@ end_of_function:
|
||||
|
||||
int HID_API_EXPORT HID_API_CALL hid_write_control(hid_device *dev, const unsigned char *data, size_t length)
|
||||
{
|
||||
DWORD bytes_written = length;
|
||||
BOOL res;
|
||||
|
||||
res = HidD_SetOutputReport(dev->device_handle, (PVOID)data, (ULONG)length);
|
||||
|
||||
if (!res) {
|
||||
register_error(dev, "SetOutputReport");
|
||||
bytes_written = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return length;
|
||||
return (int)length;
|
||||
}
|
||||
|
||||
int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char *data, size_t length, int milliseconds)
|
||||
|
||||
Reference in New Issue
Block a user