Files
OpenRGB/Controllers/DarkProject/DarkProjectControllerDetect.cpp
Chris e9eca70e72 Initial commit for the Dark Project KD3B Keyboard to resolve #2292
* Creating detector class and adding entry for the Dark Project KD3B VID & PID
* Registered detectors
* Creating DarkProjectKeyboardController class
* Creating RGBController_DarkProjectKeyboard class
* Added UDEV rule to 60-openrgb.rules
2022-04-20 16:29:48 +00:00

30 lines
1.2 KiB
C++

#include "Detector.h"
#include "RGBController.h"
#include "RGBController_DarkProjectKeyboard.h"
/*---------------------------------------------------------*\
| Dark Project vendor ID |
\*---------------------------------------------------------*/
#define DARKPROJECT_VID 0x195D
/*---------------------------------------------------------*\
| Product IDs |
\*---------------------------------------------------------*/
#define KD3B_V2_PID 0x2061
void DetectDarkProjectKeyboardControllers(hid_device_info* info, const std::string& name)
{
hid_device* dev = hid_open_path(info->path);
if(dev)
{
DarkProjectKeyboardController* controller = new DarkProjectKeyboardController(dev, info->path);
RGBController_DarkProjectKeyboard* rgb_controller = new RGBController_DarkProjectKeyboard(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
REGISTER_HID_DETECTOR_IPU("Dark Project KD3B V2", DetectDarkProjectKeyboardControllers, DARKPROJECT_VID, KD3B_V2_PID, 2, 0xFFC2, 4);