Store name in RedSquareControllers to avoid setting it in detectors
This commit is contained in:
parent
06413f2877
commit
9680d072fa
7 changed files with 35 additions and 21 deletions
|
|
@ -35,9 +35,8 @@ void DetectRedSquareKeyroxTKL(hid_device_info* info, const std::string& name)
|
|||
|
||||
if(dev)
|
||||
{
|
||||
RedSquareKeyroxController* controller = new RedSquareKeyroxController(dev, *info, KEYROX_VARIANT_TKL);
|
||||
RedSquareKeyroxController* controller = new RedSquareKeyroxController(dev, *info, KEYROX_VARIANT_TKL, name);
|
||||
RGBController_RedSquareKeyrox* rgb_controller = new RGBController_RedSquareKeyrox(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
|
@ -48,14 +47,13 @@ void DetectRedSquareKeyroxTKLClassic(hid_device_info* info, const std::string& n
|
|||
|
||||
if(dev)
|
||||
{
|
||||
RedSquareKeyroxTKLClassicController* controller = new RedSquareKeyroxTKLClassicController(dev, *info);
|
||||
RedSquareKeyroxTKLClassicController* controller = new RedSquareKeyroxTKLClassicController(dev, *info, name);
|
||||
RGBController_RedSquareKeyroxTKLClassic* rgb_controller = new RGBController_RedSquareKeyroxTKLClassic(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Red Square Keyrox TKL", DetectRedSquareKeyroxTKL, RED_SQUARE_VID, RED_SQUARE_KEYROX_TKL_PID, 3, 0xFF00, 2);
|
||||
REGISTER_HID_DETECTOR_IPU("Red Square Keyrox TKL V2", DetectRedSquareKeyroxTKL, RED_SQUARE_VID, RED_SQUARE_KEYROX_TKL_V2_PID, 3, 0xFF00, 2);
|
||||
REGISTER_HID_DETECTOR_I("Red Square Keyrox TKL Classic", DetectRedSquareKeyroxTKLClassic, RED_SQUARE_KEYROX_TKL_CLASSIC_VID, RED_SQUARE_KEYROX_TKL_CLASSIC_PID, 2);
|
||||
REGISTER_HID_DETECTOR_IPU("Red Square Keyrox TKL", DetectRedSquareKeyroxTKL, RED_SQUARE_VID, RED_SQUARE_KEYROX_TKL_PID, 3, 0xFF00, 2);
|
||||
REGISTER_HID_DETECTOR_IPU("Red Square Keyrox TKL V2", DetectRedSquareKeyroxTKL, RED_SQUARE_VID, RED_SQUARE_KEYROX_TKL_V2_PID, 3, 0xFF00, 2);
|
||||
REGISTER_HID_DETECTOR_I( "Red Square Keyrox TKL Classic", DetectRedSquareKeyroxTKLClassic, RED_SQUARE_KEYROX_TKL_CLASSIC_VID, RED_SQUARE_KEYROX_TKL_CLASSIC_PID, 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue