Store name in MSIVigorController to avoid setting it in detector

This commit is contained in:
Adam Honse 2025-08-14 11:26:20 -05:00
parent 82cb9fb7d0
commit f420e9bbbe
4 changed files with 17 additions and 18 deletions

View file

@ -22,11 +22,11 @@ static unsigned char argb_colour_index_data[2][2][2] =
{ 0x01, 0x06 }, } //G1 R1
};
MSIVigorGK30Controller::MSIVigorGK30Controller(hid_device* dev_handle, const hid_device_info& info)
MSIVigorGK30Controller::MSIVigorGK30Controller(hid_device* dev_handle, const hid_device_info& info, std::string dev_name)
{
dev = dev_handle;
location = info.path;
version = "";
dev = dev_handle;
location = info.path;
name = dev_name;
}
MSIVigorGK30Controller::~MSIVigorGK30Controller()
@ -39,6 +39,11 @@ std::string MSIVigorGK30Controller::GetDeviceLocation()
return("HID: " + location);
}
std::string MSIVigorGK30Controller::GetNameString()
{
return(name);
}
std::string MSIVigorGK30Controller::GetSerialString()
{
wchar_t serial_string[128];
@ -52,11 +57,6 @@ std::string MSIVigorGK30Controller::GetSerialString()
return(StringUtils::wstring_to_string(serial_string));
}
std::string MSIVigorGK30Controller::GetFirmwareVersion()
{
return(version);
}
unsigned int MSIVigorGK30Controller::GetLargestColour(unsigned int red, unsigned int green, unsigned int blue)
{
unsigned int largest;