mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-04 12:43:39 -04:00
Store name in LogitechControllers to avoid setting it in detectors
This commit is contained in:
@@ -19,25 +19,26 @@ const size_t HEADER_SIZE = 4;
|
||||
const size_t MESSAGE_LEN = 20;
|
||||
const size_t RESPONSE_LEN = 20;
|
||||
|
||||
LogitechG915Controller::LogitechG915Controller(hid_device* dev_handle, bool wired)
|
||||
LogitechG915Controller::LogitechG915Controller(hid_device* dev_handle, bool wired, std::string dev_name)
|
||||
{
|
||||
this->dev_handle = dev_handle;
|
||||
this->dev_handle = dev_handle;
|
||||
this->name = dev_name;
|
||||
|
||||
if(wired)
|
||||
{
|
||||
device_index = 0xFF;
|
||||
feature_4522_idx = 0x0E;
|
||||
feature_8040_idx = 0x13;
|
||||
feature_8071_idx = 0x09;
|
||||
feature_8081_idx = 0x0A;
|
||||
device_index = 0xFF;
|
||||
feature_4522_idx = 0x0E;
|
||||
feature_8040_idx = 0x13;
|
||||
feature_8071_idx = 0x09;
|
||||
feature_8081_idx = 0x0A;
|
||||
}
|
||||
else
|
||||
{
|
||||
device_index = 0x01;
|
||||
feature_4522_idx = 0x0F;
|
||||
feature_8040_idx = 0x14;
|
||||
feature_8071_idx = 0x0A;
|
||||
feature_8081_idx = 0x0B;
|
||||
device_index = 0x01;
|
||||
feature_4522_idx = 0x0F;
|
||||
feature_8040_idx = 0x14;
|
||||
feature_8071_idx = 0x0A;
|
||||
feature_8081_idx = 0x0B;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +47,11 @@ LogitechG915Controller::~LogitechG915Controller()
|
||||
|
||||
}
|
||||
|
||||
std::string LogitechG915Controller::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string LogitechG915Controller::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
Reference in New Issue
Block a user