mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-04 13:17:49 -05:00
Driver should work for NZXT Kraken X42/X52/X62/X72. Most of the color modes and settings are already working. However, there are currently some limitations in settings different ring and logo modes.
38 lines
1.5 KiB
C++
38 lines
1.5 KiB
C++
#include "NZXTKrakenController.h"
|
|
#include "RGBController.h"
|
|
#include "RGBController_NZXTKraken.h"
|
|
#include <vector>
|
|
#include <libusb-1.0/libusb.h>
|
|
|
|
#define NZXT_KRAKEN_VID 0x1E71
|
|
#define NZXT_KRAKEN_PID 0x170E
|
|
|
|
/******************************************************************************************\
|
|
* *
|
|
* DetectNZXTKrakenControllers *
|
|
* *
|
|
* Detect devices supported by the NZXTKraken driver *
|
|
* * *
|
|
\******************************************************************************************/
|
|
|
|
void DetectNZXTKrakenControllers(std::vector<RGBController*> &rgb_controllers)
|
|
{
|
|
libusb_context * ctx;
|
|
libusb_init(&ctx);
|
|
|
|
libusb_device_handle * dev = libusb_open_device_with_vid_pid(ctx, NZXT_KRAKEN_VID, NZXT_KRAKEN_PID);
|
|
|
|
if( dev )
|
|
{
|
|
libusb_detach_kernel_driver(dev, 0);
|
|
libusb_claim_interface(dev, 0);
|
|
|
|
NZXTKrakenController* controller = new NZXTKrakenController(dev);
|
|
|
|
RGBController_NZXTKraken* rgb_controller = new RGBController_NZXTKraken(controller);
|
|
|
|
rgb_controllers.push_back(rgb_controller);
|
|
}
|
|
|
|
}
|