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 c46540339a
commit 048db41b31
192 changed files with 4370 additions and 4242 deletions

View File

@@ -17,24 +17,22 @@
#define INTEL_ARC_A770_LIMITED_EDITION_VID 0x2516
#define INTEL_ARC_A770_LIMITED_EDITION_PID 0x01B5
/******************************************************************************************\
* *
* DetectIntelArcA770LEControllers *
* *
* Tests the USB address to see if an Intel Arc A770 LE controller exists there. *
* *
\******************************************************************************************/
void DetectIntelArcA770LEControllers(hid_device_info* info, const std::string&)
DetectedControllers DetectIntelArcA770LEControllers(hid_device_info* info, const std::string&)
{
hid_device* dev = hid_open_path(info->path);
if( dev )
DetectedControllers detected_controllers;
hid_device* dev;
dev = hid_open_path(info->path);
if(dev)
{
IntelArcA770LEController* controller = new IntelArcA770LEController(dev, info->path);
RGBController_IntelArcA770LE* rgb_controller = new RGBController_IntelArcA770LE(controller);
// Constructor sets the name
DetectionManager::get()->RegisterRGBController(rgb_controller);
detected_controllers.push_back(rgb_controller);
}
return(detected_controllers);
}
REGISTER_HID_DETECTOR_IP("Intel Arc A770 Limited Edition", DetectIntelArcA770LEControllers, INTEL_ARC_A770_LIMITED_EDITION_VID, INTEL_ARC_A770_LIMITED_EDITION_PID, 1, 0xFF00);