HyperX Alloy Origins keymap

This commit is contained in:
Adam Honse
2020-07-20 18:24:59 -05:00
parent 481a5dea2e
commit 1c5130e78a
2 changed files with 188 additions and 24 deletions

View File

@@ -11,6 +11,9 @@
#include <cstring>
// Skip these indices in the color output
static unsigned int skip_idx[] = { 6, 23, 29, 41, 47, 59, 70, 71, 85, 86, 91, 97, 98, 100, 105, 110, 111, 117 };
HyperXAlloyOriginsController::HyperXAlloyOriginsController(hid_device* dev_handle)
{
dev = dev_handle;
@@ -26,6 +29,14 @@ void HyperXAlloyOriginsController::SetLEDsDirect(std::vector<RGBColor> colors)
int colors_to_send = colors.size();
int colors_sent = 0;
/*-----------------------------------------------------*\
| Insert color data for unused positions |
\*-----------------------------------------------------*/
for(unsigned int skip_cnt = 0; skip_cnt < (sizeof(skip_idx) / sizeof(skip_idx[0])); skip_cnt++)
{
colors.insert(colors.begin() + skip_idx[skip_cnt], 0x00000000);
}
SendDirectInitialization();
for(int pkt_idx = 0; pkt_idx < 9; pkt_idx++)