From d1a4ead83e3e444f4b5e65904ceda0ad5e7b7457 Mon Sep 17 00:00:00 2001 From: Mola19 Date: Sat, 25 Nov 2023 04:39:16 +0100 Subject: [PATCH] fix error in Roccat Vulcan Keyboard Controller --- .../RoccatController/RoccatVulcanKeyboardController.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Controllers/RoccatController/RoccatVulcanKeyboardController.cpp b/Controllers/RoccatController/RoccatVulcanKeyboardController.cpp index 2c97fe12..1408af16 100644 --- a/Controllers/RoccatController/RoccatVulcanKeyboardController.cpp +++ b/Controllers/RoccatController/RoccatVulcanKeyboardController.cpp @@ -141,11 +141,12 @@ void RoccatVulcanKeyboardController::SendColors(std::vector colors) unsigned char packet_num = ceil((float) packet_length / 64); - std::vector bufs(packet_num); + std::vector> bufs(packet_num); for(int p = 0; p < packet_num; p++) { - memset(bufs[p], 0x00, 65); + bufs[p].resize(65); + memset(&bufs[p][0], 0x00, sizeof(bufs[p][0]) * bufs[p].size()); } bufs[0][1] = 0xA1; @@ -183,7 +184,7 @@ void RoccatVulcanKeyboardController::SendColors(std::vector colors) for(int p = 0; p < packet_num; p++) { - hid_write(dev_led, bufs[p], 65); + hid_write(dev_led, &bufs[p][0], 65); } ClearResponses();