mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-02-01 19:01:13 -05:00
Use HID serial number
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <cstring>
|
||||
#include "hid_util.h"
|
||||
#include "HIDLampArrayController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
HIDLampArrayController::HIDLampArrayController(hid_device *dev_handle, const char *path, std::string dev_name)
|
||||
{
|
||||
@@ -132,7 +133,15 @@ std::string HIDLampArrayController::GetDeviceName()
|
||||
|
||||
std::string HIDLampArrayController::GetSerialString()
|
||||
{
|
||||
return("");
|
||||
wchar_t serial_string[128];
|
||||
int ret = hid_get_serial_number_string(dev, serial_string, 128);
|
||||
|
||||
if(ret != 0)
|
||||
{
|
||||
return("");
|
||||
}
|
||||
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
unsigned int HIDLampArrayController::GetLampArrayKind()
|
||||
|
||||
Reference in New Issue
Block a user