mirror of
https://github.com/MatMoul/g810-led.git
synced 2024-12-23 01:06:11 +00:00
patch multiple keyboards lost support
This commit is contained in:
parent
96f524a532
commit
7d40992489
@ -810,7 +810,7 @@ bool LedKeyboard::setNativeEffect(NativeEffect effect, NativeEffectPart part, ui
|
|||||||
bool LedKeyboard::sendDataInternal(byte_buffer_t &data) {
|
bool LedKeyboard::sendDataInternal(byte_buffer_t &data) {
|
||||||
if (data.size() > 0) {
|
if (data.size() > 0) {
|
||||||
#if defined(hidapi)
|
#if defined(hidapi)
|
||||||
if (! open()) return false;
|
if (! open(currentDevice.vendorID, currentDevice.productID, currentDevice.serialNumber)) return false;
|
||||||
data.insert(data.begin(), 0x00);
|
data.insert(data.begin(), 0x00);
|
||||||
if (hid_write(m_hidHandle, const_cast<unsigned char*>(data.data()), data.size()) < 0) {
|
if (hid_write(m_hidHandle, const_cast<unsigned char*>(data.data()), data.size()) < 0) {
|
||||||
std::cout<<"Error: Can not write to hidraw, try with the libusb version"<<std::endl;
|
std::cout<<"Error: Can not write to hidraw, try with the libusb version"<<std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user