mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-30 11:51:12 -04:00
Removed hid_get_device_info() function to correct CI/CD pipelines
* Regression introduced in dbeabe61
* Removed unrequired includes
* Aligned other variables and structures to ensure feature parity
This commit is contained in:
@@ -233,6 +233,7 @@ void DetectLianLiGAIITrinity(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
LianLiGAIITrinityController* controller = new LianLiGAIITrinityController(dev);
|
||||
RGBController_LianLiGAIITrinity* rgb_controller = new RGBController_LianLiGAIITrinity(controller);
|
||||
rgb_controller->location = "HID: " + std::string(info->path);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,13 +29,12 @@ LianLiGAIITrinityController::GAII_Info LianLiGAIITrinityController::GetControlle
|
||||
{
|
||||
GAII_Info controllerInfo;
|
||||
|
||||
hid_device_info* hidInfo = hid_get_device_info(dev);
|
||||
|
||||
// get device location
|
||||
controllerInfo.location = "HID: " + std::string(hidInfo->path);
|
||||
|
||||
// get serial number
|
||||
std::wstring serialWStr(hidInfo->serial_number);
|
||||
const uint8_t sz = 255;
|
||||
wchar_t tmp[sz];
|
||||
|
||||
hid_get_serial_number_string(dev, tmp, sz);
|
||||
std::wstring serialWStr = std::wstring(tmp);
|
||||
controllerInfo.serial = std::string(serialWStr.begin(), serialWStr.end());
|
||||
|
||||
// get firmware version
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
#include "RGBController.h"
|
||||
#include "hidapi/hidapi.h"
|
||||
#include <vector>
|
||||
#ifdef __FreeBSD__
|
||||
#include <libusb.h>
|
||||
#else
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -26,7 +21,6 @@ class LianLiGAIITrinityController
|
||||
public:
|
||||
struct GAII_Info
|
||||
{
|
||||
std::string location;
|
||||
std::string serial;
|
||||
std::string version;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,6 @@ RGBController_LianLiGAIITrinity::RGBController_LianLiGAIITrinity(LianLiGAIITrini
|
||||
|
||||
LianLiGAIITrinityController::GAII_Info controllerInfo = controller->GetControllerInfo();
|
||||
version = controllerInfo.version;
|
||||
location = controllerInfo.location;
|
||||
serial = controllerInfo.serial;
|
||||
|
||||
mode Rainbow;
|
||||
|
||||
Reference in New Issue
Block a user