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

This commit is contained in:
Adam Honse committed 2026-05-07 17:24:45 -05:00
1 parent f6f317d487
commit 52f0049025
196 files changed
+4467 -4302

No files matched your search

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