mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-29 19:31:08 -04:00
Controllers/MNTKeyboardController: MSVC does not like C99 variable length...
This commit is contained in:
@@ -20,7 +20,7 @@ void MNTKeyboardController::SendColorMatrix(unsigned char *color_map)
|
||||
{
|
||||
unsigned char row_size = kbd_cols * KBD_COLOR_SIZE;
|
||||
unsigned char cmdbuf_size = CMD_OFFSET + row_size;
|
||||
unsigned char usb_buf[cmdbuf_size];
|
||||
unsigned char *usb_buf = new unsigned char[cmdbuf_size];
|
||||
memcpy(usb_buf, CMD_PREFIX, CMD_PREFIX_LEN);
|
||||
for(unsigned int row_idx = 0; row_idx < KBD_ROWS; row_idx++)
|
||||
{
|
||||
@@ -28,4 +28,5 @@ void MNTKeyboardController::SendColorMatrix(unsigned char *color_map)
|
||||
memcpy(usb_buf + CMD_OFFSET, color_map + row_idx * row_size, row_size);
|
||||
hid_write(dev, usb_buf, cmdbuf_size);
|
||||
}
|
||||
delete[] usb_buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user