mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 14:14:17 -04:00
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
This commit is contained in:
29
Controllers/DarkProject/DarkProjectControllerDetect.cpp
Normal file
29
Controllers/DarkProject/DarkProjectControllerDetect.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#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);
|
||||
Reference in New Issue
Block a user