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 0ccdd5329f
commit 3c4a72bda9
197 changed files with 4481 additions and 4332 deletions

View File

@@ -14,18 +14,23 @@
#include "DetectionManager.h"
#include "RGBController_ValkyrieKeyboard.h"
void DetectValkyrieKeyboardControllers(hid_device_info* info, const std::string& name)
DetectedControllers DetectValkyrieKeyboardControllers(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)
{
ValkyrieKeyboardController* controller = new ValkyrieKeyboardController(dev, info->path, info->product_id, info->interface_number, name);
RGBController_ValkyrieKeyboard* rgb_controller = new RGBController_ValkyrieKeyboard(controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
detected_controllers.push_back(rgb_controller);
}
return(detected_controllers);
}
/* DetectValkyrieKeyboardControllers() */
REGISTER_HID_DETECTOR_IPU("Valkyrie VK99 Pro", DetectValkyrieKeyboardControllers, VALKYRIE_VID, VALKYRIE_99_PRO_PID, 3, 0xFF13, 0x0001);
REGISTER_HID_DETECTOR_IPU("Valkyrie VK99", DetectValkyrieKeyboardControllers, VALKYRIE_VID, VALKYRIE_99_NORMAL_PID, 2, 0xFF13, 0x0001);