mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-14 01:24:39 -04:00
Fix flickering on JGINYUE USB controller direct mode
This commit is contained in:
@@ -191,21 +191,22 @@ void JGINYUEInternalUSBController::DirectLEDControl
|
||||
break;
|
||||
}
|
||||
|
||||
device_config[Active_zone].Mode_active =JGINYUE_USB_MODE_DIRECT;
|
||||
device_config[Active_zone].Direct_Mode_control =0x01;
|
||||
if(device_config[Active_zone].Mode_active != JGINYUE_USB_MODE_DIRECT)
|
||||
{
|
||||
device_config[Active_zone].Mode_active =JGINYUE_USB_MODE_DIRECT;
|
||||
device_config[Active_zone].Direct_Mode_control =0x01;
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
usb_buf[0x00] = JGINYUE_USB_LED_STRIPE_SET_COMMAND_HEADER;
|
||||
usb_buf[0x01] = zone;
|
||||
usb_buf[0x02] = device_config[Active_zone].LED_numbers;
|
||||
usb_buf[0x03] = device_config[Active_zone].RG_Swap;
|
||||
usb_buf[0x04] = device_config[Active_zone].Direction;
|
||||
usb_buf[0x05] = device_config[Active_zone].Direct_Mode_control;
|
||||
usb_buf[0x00] = JGINYUE_USB_LED_STRIPE_SET_COMMAND_HEADER;
|
||||
usb_buf[0x01] = zone;
|
||||
usb_buf[0x02] = device_config[Active_zone].LED_numbers;
|
||||
usb_buf[0x03] = device_config[Active_zone].RG_Swap;
|
||||
usb_buf[0x04] = device_config[Active_zone].Direction;
|
||||
usb_buf[0x05] = device_config[Active_zone].Direct_Mode_control;
|
||||
|
||||
hid_write(dev, usb_buf, 16);
|
||||
|
||||
std::this_thread::sleep_for(20ms);
|
||||
hid_write(dev, usb_buf, 16);
|
||||
}
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user