Add ViewSonic Elite XG270QG
Amended for code style by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
parent
0d7e947575
commit
817d5d55df
6 changed files with 382 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
#include "Detector.h"
|
||||
#include "VS_XG270QG_Controller.h"
|
||||
#include "RGBController_XG270QG.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#include "LogManager.h"
|
||||
|
||||
#define VIEWSONIC_VID 0x0416
|
||||
#define VS_XG270QG_PID 0x5020
|
||||
|
||||
void DetectViewSonic(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
VS_XG270QG_Controller* controller = new VS_XG270QG_Controller(dev, info->path);
|
||||
RGBController_XG270QG* rgb_controller = new RGBController_XG270QG(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("ViewSonic Monitor XG270QG", DetectViewSonic, VIEWSONIC_VID, VS_XG270QG_PID, 0, 0xFF00, 1);
|
||||
Loading…
Add table
Add a link
Reference in a new issue