mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 03:56:26 -04:00
Initial HP Omen 30L Support
Commits squashed and amended for code style/brightness control by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
committed by
Adam Honse
parent
e52ba49815
commit
85631bfd52
@@ -0,0 +1,31 @@
|
||||
#include "Detector.h"
|
||||
#include "HPOmen30LController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_HPOmen30L.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#define HP_OMEN_30L_VID 0x103C
|
||||
#define HP_OMEN_30L_PID 0x84FD
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectHPOmen30LController *
|
||||
* *
|
||||
* Tests the USB address to see if an HP Omen 30L controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectHPOmen30LController(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
HPOmen30LController* controller = new HPOmen30LController(dev, info->path);
|
||||
RGBController_HPOmen30L* rgb_controller = new RGBController_HPOmen30L(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("HP Omen 30L", DetectHPOmen30LController, HP_OMEN_30L_VID, HP_OMEN_30L_PID);
|
||||
Reference in New Issue
Block a user