Add G410 support

This commit is contained in:
2016-08-07 19:40:48 +02:00
parent 841176763a
commit 44e029c57d
3 changed files with 17 additions and 10 deletions
+2 -2
View File
@@ -12,12 +12,12 @@ bool Keyboard::isAttached() {
return m_isAttached;
}
bool Keyboard::attach() {
bool Keyboard::attach(int lg_pid) {
if (m_isAttached == true) return false;
int r;
r = libusb_init(&ctx);
if (r < 0) return false;
dev_handle = libusb_open_device_with_vid_pid(ctx, 0x046d, 0xc331);
dev_handle = libusb_open_device_with_vid_pid(ctx, 0x046d, lg_pid);
if (dev_handle == NULL) {
libusb_exit(ctx);
ctx = NULL;
+1 -1
View File
@@ -33,7 +33,7 @@ class Keyboard {
struct KeyValue { KeyAddress key; KeyColors colors; };
bool isAttached();
bool attach();
bool attach(int lg_pid);
bool detach();
bool commit();
bool getKeyAddress(Key key, KeyAddress &keyAddress);