mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-27 19:09:15 -04:00
Use HID path for Location on HyperX Alloy Origins controller
This commit is contained in:
1 parent
d6350c8504
commit
2f08436e95
4 files changed
+14
-4
No files matched your search
@@ -14,9 +14,10 @@
|
||||
// Skip these indices in the color output
|
||||
static unsigned int skip_idx[] = { 6, 23, 29, 41, 47, 59, 70, 71, 75, 76, 87, 88, 93, 99, 100, 102, 108, 113, 114, 120, 123, 124 };
|
||||
|
||||
HyperXAlloyOriginsController::HyperXAlloyOriginsController(hid_device* dev_handle)
|
||||
HyperXAlloyOriginsController::HyperXAlloyOriginsController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
HyperXAlloyOriginsController::~HyperXAlloyOriginsController()
|
||||
@@ -24,6 +25,11 @@ HyperXAlloyOriginsController::~HyperXAlloyOriginsController()
|
||||
|
||||
}
|
||||
|
||||
std::string HyperXAlloyOriginsController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
}
|
||||
|
||||
void HyperXAlloyOriginsController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
|
||||
@@ -17,13 +17,16 @@
|
||||
class HyperXAlloyOriginsController
|
||||
{
|
||||
public:
|
||||
HyperXAlloyOriginsController(hid_device* dev_handle);
|
||||
HyperXAlloyOriginsController(hid_device* dev_handle, const char* path);
|
||||
~HyperXAlloyOriginsController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SetLEDsDirect(std::vector<RGBColor> colors);
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
|
||||
void SendDirectInitialization();
|
||||
void SendDirectColorPacket
|
||||
|
||||
@@ -94,7 +94,7 @@ void DetectHyperXKeyboardControllers(std::vector<RGBController*>& rgb_controller
|
||||
|
||||
if( dev )
|
||||
{
|
||||
HyperXAlloyOriginsController* controller = new HyperXAlloyOriginsController(dev);
|
||||
HyperXAlloyOriginsController* controller = new HyperXAlloyOriginsController(dev, info->path);
|
||||
|
||||
RGBController_HyperXAlloyOrigins* rgb_controller = new RGBController_HyperXAlloyOrigins(controller);
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ RGBController_HyperXAlloyOrigins::RGBController_HyperXAlloyOrigins(HyperXAlloyOr
|
||||
name = "HyperX Alloy Origins Keyboard Device";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "HyperX Alloy Origins Keyboard Device";
|
||||
location = hyperx->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
||||
Reference in new issue
Block a user