mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-18 03:57:50 -05:00
Store name in RedSquareControllers to avoid setting it in detectors
This commit is contained in:
@@ -161,10 +161,10 @@ RGBController_RedSquareKeyrox::RGBController_RedSquareKeyrox(RedSquareKeyroxCont
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Red Square Keyrox";
|
||||
name = controller->GetNameString();
|
||||
vendor = "Red Square";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = name;
|
||||
description = "Red Square Keyrox Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
RedSquareKeyroxController::RedSquareKeyroxController(hid_device *dev_handle, const hid_device_info &info, int variant)
|
||||
RedSquareKeyroxController::RedSquareKeyroxController(hid_device *dev_handle, const hid_device_info &info, int variant, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = info.path;
|
||||
name = dev_name;
|
||||
this->variant = variant;
|
||||
}
|
||||
|
||||
@@ -37,6 +38,11 @@ std::string RedSquareKeyroxController::GetDeviceLocation()
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string RedSquareKeyroxController::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string RedSquareKeyroxController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_wchar[128];
|
||||
|
||||
@@ -60,11 +60,12 @@ enum
|
||||
class RedSquareKeyroxController
|
||||
{
|
||||
public:
|
||||
RedSquareKeyroxController(hid_device *dev_handle, const hid_device_info &info, int variant);
|
||||
RedSquareKeyroxController(hid_device *dev_handle, const hid_device_info &info, int variant, std::string dev_name);
|
||||
~RedSquareKeyroxController();
|
||||
|
||||
int GetVariant();
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetNameString();
|
||||
std::string GetSerialString();
|
||||
|
||||
int GetDirectionLRUD(int direction); // Direction for Left-Right-Up-Down modes
|
||||
@@ -83,6 +84,7 @@ protected:
|
||||
private:
|
||||
int variant;
|
||||
std::string location;
|
||||
std::string name;
|
||||
std::string serial_number;
|
||||
std::vector<unsigned int> led_sequence_positions;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user