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 1ccaadd5d0
commit 9bb2a4e693
197 changed files with 4481 additions and 4332 deletions

View File

@@ -80,8 +80,9 @@ static const nv_gpu_pci_device device_list[] =
{NVIDIA_VEN, NVIDIA_RTX5090_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX5090_FE_SUB_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGBW, "NVIDIA GeForce RTX 5090 FE" },
};
void DetectNVIDIAIllumGPUs()
DetectedControllers DetectNVIDIAIllumGPUs()
{
DetectedControllers detected_controllers;
static NV_PHYSICAL_GPU_HANDLE gpu_handles[64];
static NV_S32 gpu_count = 0;
NV_U32 device_id;
@@ -119,7 +120,7 @@ void DetectNVIDIAIllumGPUs()
NVIDIAIlluminationV1Controller* controller = new NVIDIAIlluminationV1Controller(new_nvapi, device_list[dev_idx].treats_rgbw_as_rgb, device_list[dev_idx].name);
RGBController_NVIDIAIlluminationV1* rgb_controller = new RGBController_NVIDIAIlluminationV1(controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
detected_controllers.push_back(rgb_controller);
}
break;
}
@@ -127,6 +128,8 @@ void DetectNVIDIAIllumGPUs()
}
}
}
return(detected_controllers);
}
REGISTER_DETECTOR("Nvidia NvAPI Illumination", DetectNVIDIAIllumGPUs);