mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-14 17:44:47 -04:00
Fix issues preventing hidapi from working without WinUSB on Windows
This commit is contained in:
@@ -130,30 +130,30 @@ void DetectCorsairPeripheralControllers(std::vector<RGBController*>& rgb_control
|
||||
while(info)
|
||||
{
|
||||
if((info->vendor_id == device_list[device_idx].usb_vid)
|
||||
#ifdef USE_HID_USAGE
|
||||
&&(info->product_id == device_list[device_idx].usb_pid)
|
||||
&&(info->interface_number == device_list[device_idx].usb_interface))
|
||||
&&(info->usage_page == 0xFFC2))
|
||||
#else
|
||||
&&(info->product_id == device_list[device_idx].usb_pid))
|
||||
#endif
|
||||
{
|
||||
dev = hid_open_path(info->path);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
info = info->next;
|
||||
}
|
||||
}
|
||||
|
||||
if( dev )
|
||||
{
|
||||
CorsairPeripheralController* controller = new CorsairPeripheralController(dev);
|
||||
if( dev )
|
||||
{
|
||||
CorsairPeripheralController* controller = new CorsairPeripheralController(dev);
|
||||
|
||||
if(controller->GetDeviceType() != DEVICE_TYPE_UNKNOWN)
|
||||
{
|
||||
RGBController_CorsairPeripheral* rgb_controller = new RGBController_CorsairPeripheral(controller);
|
||||
if(controller->GetDeviceType() != DEVICE_TYPE_UNKNOWN)
|
||||
{
|
||||
RGBController_CorsairPeripheral* rgb_controller = new RGBController_CorsairPeripheral(controller);
|
||||
|
||||
rgb_controller->name = device_list[device_idx].name;
|
||||
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
rgb_controller->name = device_list[device_idx].name;
|
||||
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
}
|
||||
}
|
||||
}
|
||||
info = info->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user