mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-22 05:57:53 -05:00
Move HID detector calls to RunHIDDetector/RunHIDWrappedDetector functions and return controller list from detector functions
This commit is contained in:
@@ -18,9 +18,12 @@
|
||||
#define LIGHTSALT_VID 0x0483
|
||||
#define LIGHTSALT_PID 0x5750
|
||||
|
||||
void DetectLightSaltControllers(hid_device_info* info, const std::string &)
|
||||
DetectedControllers DetectLightSaltControllers(hid_device_info* info, const std::string &)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
@@ -44,9 +47,11 @@ void DetectLightSaltControllers(hid_device_info* info, const std::string &)
|
||||
|
||||
if(rgb_controller != nullptr)
|
||||
{
|
||||
DetectionManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
}
|
||||
} /* DetectLightSaltControllers() */
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("LightSalt Peripherals", DetectLightSaltControllers, LIGHTSALT_VID, LIGHTSALT_PID, 1, 1, 0);
|
||||
|
||||
Reference in New Issue
Block a user