mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 22:24:12 -04:00
Looks like JSAUX controller needs extra report ID only on Windows, breaks on Linux, so add conditional compilation hack
This commit is contained in:
@@ -32,22 +32,27 @@ void WushiL50USBController::setMode(WushiL50State * in_mode)
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up custom lighting packet |
|
||||
\*-----------------------------------------------------*/
|
||||
usb_buf[0x00] = 0xCC;
|
||||
usb_buf[0x01] = 0x16;
|
||||
usb_buf[0x02] = in_mode->effect;
|
||||
usb_buf[0x03] = in_mode->speed;
|
||||
usb_buf[0x04] = in_mode->brightness;
|
||||
#ifdef _WIN32
|
||||
#define OFFSET 1
|
||||
usb_buf[0x00] = 0xCC;
|
||||
#else
|
||||
#define OFFSET 0
|
||||
#endif
|
||||
usb_buf[0x00 + OFFSET] = 0x16;
|
||||
usb_buf[0x01 + OFFSET] = in_mode->effect;
|
||||
usb_buf[0x02 + OFFSET] = in_mode->speed;
|
||||
usb_buf[0x03 + OFFSET] = in_mode->brightness;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Copy in color data |
|
||||
\*-----------------------------------------------------*/
|
||||
memcpy(&usb_buf[0x05], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x08], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x0B], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x0E], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x04 + OFFSET], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x07 + OFFSET], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x0A + OFFSET], in_mode->zone0_rgb, 3);
|
||||
memcpy(&usb_buf[0x0D + OFFSET], in_mode->zone0_rgb, 3);
|
||||
|
||||
usb_buf[0x12] = in_mode->wave_ltr;
|
||||
usb_buf[0x13] = in_mode->wave_rtl;
|
||||
usb_buf[0x11 + OFFSET] = in_mode->wave_ltr;
|
||||
usb_buf[0x12 + OFFSET] = in_mode->wave_rtl;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
|
||||
Reference in New Issue
Block a user