Add support for Lego Dimensions Toypad Base. Closes #3399

This commit is contained in:
morg
2023-06-03 19:08:18 +00:00
committed by Adam Honse
parent ae11bb6a16
commit a7f3d536ab
6 changed files with 403 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include "Detector.h"
#include "LegoDimensionsToypadBaseController.h"
#include "RGBController.h"
#include "RGBController_LegoDimensionsToypadBase.h"
/*---------------------------------------------------------*\
| Logic3 vendor ID |
\*---------------------------------------------------------*/
#define LOGIC_3_VID 0x0E6F
/*---------------------------------------------------------*\
| Lego Dimensions Toypad Base product ID |
\*---------------------------------------------------------*/
#define LEGO_DIMENSIONS_TOYPAD_BASE_PID 0x0241
void DetectLegoDimensionsToypadBaseControllers(hid_device_info* info, const std::string& name)
{
hid_device* dev = hid_open_path(info->path);
if(dev)
{
LegoDimensionsToypadBaseController* controller = new LegoDimensionsToypadBaseController(dev, *info);
RGBController_LegoDimensionsToypadBase* rgb_controller = new RGBController_LegoDimensionsToypadBase(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
REGISTER_HID_DETECTOR("Lego Dimensions Toypad Base", DetectLegoDimensionsToypadBaseControllers, LOGIC_3_VID, LEGO_DIMENSIONS_TOYPAD_BASE_PID);