Re-add interface check for Corsair driver when not using HID usages. Only set special function control for non-keyboards

This commit is contained in:
Adam Honse
2020-07-02 15:37:00 -05:00
parent 94ab5bbced
commit 18d35fcb82
2 changed files with 5 additions and 2 deletions

View File

@@ -30,7 +30,6 @@ CorsairPeripheralController::CorsairPeripheralController(hid_device* dev_handle)
ReadFirmwareInfo();
SpecialFunctionControl();
LightingControl();
}
@@ -346,6 +345,7 @@ void CorsairPeripheralController::ReadFirmwareInfo()
case 0xC1:
type = DEVICE_TYPE_MOUSE;
SpecialFunctionControl();
break;
case 0xC2:
@@ -356,10 +356,12 @@ void CorsairPeripheralController::ReadFirmwareInfo()
{
case 0x0A34:
type = DEVICE_TYPE_HEADSET_STAND;
SpecialFunctionControl();
break;
default:
type = DEVICE_TYPE_MOUSEMAT;
SpecialFunctionControl();
break;
}
}

View File

@@ -134,7 +134,8 @@ void DetectCorsairPeripheralControllers(std::vector<RGBController*>& rgb_control
&&(info->product_id == device_list[device_idx].usb_pid)
&&(info->usage_page == 0xFFC2))
#else
&&(info->product_id == device_list[device_idx].usb_pid))
&&(info->product_id == device_list[device_idx].usb_pid)
&&(info->interface_number == device_list[device_idx].usb_interface))
#endif
{
dev = hid_open_path(info->path);