mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-21 21:47:54 -05:00
Move HID detector calls to RunHIDDetector/RunHIDWrappedDetector functions and return controller list from detector functions
This commit is contained in:
@@ -15,27 +15,24 @@
|
||||
#include "RGBController_BlinkController.h"
|
||||
|
||||
#define THINGM_VID 0x27B8
|
||||
|
||||
#define THINGM_BLINK_PID 0x01ED
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectThingMControllers *
|
||||
* *
|
||||
* Tests the USB address to see if any CoolerMaster controllers exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectThingMBlink(hid_device_info* info, const std::string&)
|
||||
DetectedControllers DetectThingMBlink(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)
|
||||
{
|
||||
BlinkController* controller = new BlinkController(dev, info->path);
|
||||
BlinkController* controller = new BlinkController(dev, info->path);
|
||||
RGBController_BlinkController* rgb_controller = new RGBController_BlinkController(controller);
|
||||
// Constructor sets the name
|
||||
DetectionManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_PU("ThingM blink(1) mk2", DetectThingMBlink, THINGM_VID, THINGM_BLINK_PID, 0xFF00, 0x01);
|
||||
|
||||
Reference in New Issue
Block a user