From 519f20211c4365ca6e27bea5989597481ff75b2b Mon Sep 17 00:00:00 2001 From: MatMoul Date: Wed, 14 Dec 2016 01:44:33 +0100 Subject: [PATCH] include libusb.h and reindent libusb_device_descriptor desc --- src/classes/Keyboard.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index f2400a5..43151f9 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -2,7 +2,7 @@ #include #include #include -#include "/usr/include/libusb-1.0/libusb.h" +#include "libusb.h" bool Keyboard::isAttached() { @@ -21,20 +21,22 @@ bool Keyboard::attach() { int pid = 0; for(ssize_t i = 0; i < cnt; i++) { libusb_device *device = devs[i]; - libusb_device_descriptor desc = {0, // bLength - 0, // bDescriptorType - 0, // bcdUSB - 0, // bDeviceClass - 0, // bDeviceSubClass - 0, // bDeviceProtocol - 0, // bMaxPacketSize0 - 0, // idVendor - 0, // idProduct - 0, // bcdDevice - 0, // iManufacturer - 0, // iProduct - 0, // iSerialNumber - 0}; // bNumConfigurations + libusb_device_descriptor desc = { + 0, // bLength + 0, // bDescriptorType + 0, // bcdUSB + 0, // bDeviceClass + 0, // bDeviceSubClass + 0, // bDeviceProtocol + 0, // bMaxPacketSize0 + 0, // idVendor + 0, // idProduct + 0, // bcdDevice + 0, // iManufacturer + 0, // iProduct + 0, // iSerialNumber + 0 // bNumConfigurations + }; libusb_get_device_descriptor(device, &desc); if (desc.idVendor == 0x046d) { if (desc.idProduct == 0xc331) { pid = desc.idProduct; break; } // G810 spectrum