Code cleanup and rework for MSI Mystic Light controller

* Replace decimal constants with hexadecimal constants when ANDing/ORing values
* Add comments to explain what the code is doing
* Use C-style casts to fit the project standards
This commit is contained in:
Adam Honse 2020-07-05 13:16:21 -05:00
parent a1cd324731
commit 5f9c4f8432
2 changed files with 164 additions and 45 deletions

View file

@ -127,7 +127,7 @@ void NZXTKrakenController::SendEffect
int size /* = 0 */
)
{
unsigned char usb_buf[65];
unsigned char usb_buf[64];
/*-----------------------------------------------------*\
| Zero out buffer |
@ -170,5 +170,5 @@ void NZXTKrakenController::SendEffect
/*-----------------------------------------------------*\
| Send effect |
\*-----------------------------------------------------*/
hid_write(dev, usb_buf, 65);
hid_write(dev, usb_buf, 64);
}