mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-19 04:27:51 -05:00
Store name in SRGBmodsControllers to avoid setting it in detectors
This commit is contained in:
@@ -26,7 +26,7 @@ RGBController_SRGBmodsLEDControllerV1::RGBController_SRGBmodsLEDControllerV1(SRG
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "SRGBmods Device";
|
||||
name = controller->GetNameString();
|
||||
vendor = "SRGBmods.net";
|
||||
description = "SRGBmods LED Controller V1 Device";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
SRGBmodsLEDControllerV1::SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path)
|
||||
SRGBmodsLEDControllerV1::SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
SRGBmodsLEDControllerV1::~SRGBmodsLEDControllerV1()
|
||||
@@ -31,6 +32,11 @@ std::string SRGBmodsLEDControllerV1::GetLocationString()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string SRGBmodsLEDControllerV1::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string SRGBmodsLEDControllerV1::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
@@ -28,10 +28,11 @@ enum
|
||||
class SRGBmodsLEDControllerV1
|
||||
{
|
||||
public:
|
||||
SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path);
|
||||
SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~SRGBmodsLEDControllerV1();
|
||||
|
||||
std::string GetLocationString();
|
||||
std::string GetNameString();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetChannelLEDs(unsigned char channel, RGBColor * colors, unsigned int num_colors);
|
||||
@@ -41,6 +42,7 @@ public:
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendPacket
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user