mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-30 11:51:12 -04:00
Add MadCatzCyborgController for MadCatz Cyborg Gaming Light
This commit is contained in:
committed by
Adam Honse
parent
3e7ad705bb
commit
7177a534b9
@@ -0,0 +1,45 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| MadCatzCyborgControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for MadCatz Cyborg Gaming Light |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "MadCatzCyborgController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_MadCatzCyborg.h"
|
||||
#include <hidapi.h>
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| MadCatz Cyborg VID/PID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define MADCATZ_VID 0x06A3
|
||||
#define MADCATZ_CYBORG_PID 0x0DC5
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectMadCatzCyborgControllers *
|
||||
* *
|
||||
* Tests the USB address to find MadCatz Cyborg Gaming Light devices *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectMadCatzCyborgControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
MadCatzCyborgController* controller = new MadCatzCyborgController(dev, info->path);
|
||||
controller->Initialize();
|
||||
|
||||
RGBController_MadCatzCyborg* rgb_controller = new RGBController_MadCatzCyborg(controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("MadCatz Cyborg Gaming Light", DetectMadCatzCyborgControllers, MADCATZ_VID, MADCATZ_CYBORG_PID);
|
||||
Reference in New Issue
Block a user