Add support for the Alienware AW3423DWF and AW3225QF monitors
This commit is contained in:
parent
ce62d9998e
commit
fd4403ec68
5 changed files with 423 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
#include "Detector.h"
|
||||
#include "AlienwareAW3423DWFController.h"
|
||||
#include "RGBController_AlienwareAW3423DWF.h"
|
||||
#include <hidapi.h>
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Alienware Vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ALIENWARE_VID 0x187C
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Alienware Vendor ID |
|
||||
\*---------------------------------------------------------*/
|
||||
#define ALIENWARE_AW3423DWF_PID 0x100E
|
||||
#define ALIENWARE_AW3225QF_PID 0x1013
|
||||
#define ALIENWARE_USAGE_PAGE 0xFFDA
|
||||
#define ALIENWARE_USAGE 0x00DA
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* AlienwareAW3423DWFControllerDetect *
|
||||
* *
|
||||
* Tests the USB address to see if an Alienware AW3423DWF exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::string&)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if(dev)
|
||||
{
|
||||
AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path);
|
||||
RGBController_AlienwareAW3423DWF* rgb_controller = new RGBController_AlienwareAW3423DWF(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("Alienware AW3423DWF", DetectAlienwareAW3423DWFControllers, ALIENWARE_VID, ALIENWARE_AW3423DWF_PID);
|
||||
REGISTER_HID_DETECTOR("Alienware AW3225QF", DetectAlienwareAW3423DWFControllers, ALIENWARE_VID, ALIENWARE_AW3225QF_PID);
|
||||
Loading…
Add table
Add a link
Reference in a new issue