mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Use HID path for Location on Holtek controller
This commit is contained in:
@@ -10,9 +10,15 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
HoltekA070Controller::HoltekA070Controller(hid_device* dev_handle)
|
||||
HoltekA070Controller::HoltekA070Controller(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
std::string HoltekA070Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
|
||||
@@ -24,9 +24,11 @@ enum
|
||||
class HoltekA070Controller
|
||||
{
|
||||
public:
|
||||
HoltekA070Controller(hid_device* dev_handle);
|
||||
HoltekA070Controller(hid_device* dev_handle, const char* path);
|
||||
~HoltekA070Controller();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SendCustomColor
|
||||
(
|
||||
unsigned char red,
|
||||
@@ -41,4 +43,5 @@ public:
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ void DetectHoltekControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
case HOLTEK_A070_PID:
|
||||
{
|
||||
HoltekA070Controller* controller = new HoltekA070Controller(dev);
|
||||
HoltekA070Controller* controller = new HoltekA070Controller(dev, info->path);
|
||||
|
||||
RGBController_HoltekA070* rgb_controller = new RGBController_HoltekA070(controller);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ RGBController_HoltekA070::RGBController_HoltekA070(HoltekA070Controller* holtek_
|
||||
name = "Holtek USB Gaming Mouse Device";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "Holtek USB Gaming Mouse Device";
|
||||
location = holtek->GetDeviceLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
||||
Reference in New Issue
Block a user