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

This commit is contained in:
Adam Honse committed 2026-04-13 11:43:20 -05:00
1 parent 8374a650f6
commit e546dc63e8
196 files changed
+4459 -4299

No files matched your search

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