diff --git a/Controllers/HIDLampArrayController/HIDLampArrayController.cpp b/Controllers/HIDLampArrayController/HIDLampArrayController.cpp index a0f644715..83ce03016 100644 --- a/Controllers/HIDLampArrayController/HIDLampArrayController.cpp +++ b/Controllers/HIDLampArrayController/HIDLampArrayController.cpp @@ -13,6 +13,7 @@ #include #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()