Add support for Patriot Viper V550

This commit is contained in:
mi4code
2025-05-24 04:43:52 +00:00
committed by Adam Honse
parent a4476055ec
commit 0a3a1e627c
5 changed files with 310 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/*---------------------------------------------------------*\
| PatriotViperMouseControllerDetect.cpp |
| |
| Detector for Patriot Viper Mouse |
| |
| mi4code 07 Apr 2025 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "Detector.h"
#include "PatriotViperMouseController.h"
#include "RGBController_PatriotViperMouse.h"
/*-----------------------------------------------------*\
| Patriot Viper Mouse IDs |
\*-----------------------------------------------------*/
#define PATRIOT_VID 0x0C45
#define VIPER_V550_PID 0x7E18
void DetectPatriotViperMouseControllers(hid_device_info* info, const std::string& name)
{
hid_device* dev = hid_open_path(info->path);
if(dev)
{
PatriotViperMouseController* controller = new PatriotViperMouseController(dev, info->path);
RGBController_PatriotViperMouse* rgb_controller = new RGBController_PatriotViperMouse(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
REGISTER_HID_DETECTOR_IPU("Patriot Viper V550", DetectPatriotViperMouseControllers, PATRIOT_VID, VIPER_V550_PID, 2, 0xFF18, 0x01);