mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Move HID detector calls to RunHIDDetector/RunHIDWrappedDetector functions and return controller list from detector functions
This commit is contained in:
@@ -12,35 +12,32 @@
|
||||
#include "ATC800Controller.h"
|
||||
#include "RGBController_AorusATC800.h"
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define HOLTEK_VID 0x1044
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Controller product ids |
|
||||
\*-----------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| Controller product ids |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ATC_800_CONTROLLER_PID 0x7A42
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectAorusCPUCoolerControllers *
|
||||
* *
|
||||
* Tests the USB address to see if a Aorus RGB CPU Cooler exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectGigabyteAorusCPUCoolerControllers(hid_device_info* info, const std::string& name)
|
||||
DetectedControllers DetectGigabyteAorusCPUCoolerControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
ATC800Controller* controller = new ATC800Controller(dev, info->path, name);
|
||||
RGBController_AorusATC800* rgb_controller = new RGBController_AorusATC800(controller);
|
||||
|
||||
DetectionManager::get()->RegisterRGBController(rgb_controller);
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Gigabyte AORUS ATC800", DetectGigabyteAorusCPUCoolerControllers, HOLTEK_VID, ATC_800_CONTROLLER_PID, 0, 0xFF01, 1);
|
||||
|
||||
Reference in New Issue
Block a user