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 464ef419e7
commit fe4ca34528
203 changed files with 4754 additions and 4576 deletions

View File

@@ -16,17 +16,22 @@
#define GIGABYTE_CASTOR3_VID 0x0414
#define GIGABYTE_CASTOR3_PID 0x7A5E
void DetectGigabyteCastor3Controllers(hid_device_info* info, const std::string& /*name*/)
DetectedControllers DetectGigabyteCastor3Controllers(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)
{
GigabyteCastor3Controller* controller = new GigabyteCastor3Controller(dev, info->path);
RGBController_GigabyteCastor3* rgb_controller = new RGBController_GigabyteCastor3(controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
detected_controllers.push_back(rgb_controller);
}
return(detected_controllers);
}
REGISTER_HID_DETECTOR_IPU("Gigabyte Aorus Waterforce X II 360", DetectGigabyteCastor3Controllers, GIGABYTE_CASTOR3_VID, GIGABYTE_CASTOR3_PID, 0, 0x0000, 0x0002);