Move HID detector calls to RunHIDDetector/RunHIDWrappedDetector functions and return controller list from detector functions

This commit is contained in:
Adam Honse
2026-01-12 19:05:21 -06:00
parent 18138c1527
commit b19e65cd2d
196 changed files with 4467 additions and 4302 deletions

View File

@@ -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);