1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2026-03-13 11:59:38 +00:00

Bug correction in sendDataInternal

This commit is contained in:
2017-01-11 20:25:37 +01:00
parent caed630b14
commit 83d16a23c1
2 changed files with 4 additions and 15 deletions

View File

@@ -504,8 +504,11 @@ bool Keyboard::sendDataInternal(unsigned char *data, uint16_t data_size) {
int r;
if (data_size > 20) r = libusb_control_transfer(dev_handle, 0x21, 0x09, 0x0212, 1, data, data_size, 2000);
else r = libusb_control_transfer(dev_handle, 0x21, 0x09, 0x0211, 1, data, data_size, 2000);
usleep(1000);
usleep(1);
if (r < 0) return false;
unsigned char buffer[64];
int len = 0;
r = libusb_interrupt_transfer(dev_handle, 0x82, buffer, sizeof(buffer), &len, 1);
return true;
}