mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-18 03:25:11 -04:00
Fill in serial field for all HID controllers using hidapi
This commit is contained in:
@@ -27,6 +27,17 @@ std::string HyperXPulsefireSurgeController::GetDeviceLocation()
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
std::string HyperXPulsefireSurgeController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
hid_get_serial_number_string(dev, serial_string, 128);
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
| Private packet sending functions. |
|
||||
\*-------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
~HyperXPulsefireSurgeController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SelectProfile
|
||||
(
|
||||
|
||||
@@ -20,6 +20,7 @@ RGBController_HyperXPulsefireSurge::RGBController_HyperXPulsefireSurge(HyperXPul
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "HyperX Pulsefire Surge Device";
|
||||
location = hyperx->GetDeviceLocation();
|
||||
serial = hyperx->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
||||
Reference in New Issue
Block a user