mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-27 09:23:57 -04:00
Move wstring to string conversion to StringUtils.cpp and update most HID get serial number functions to use it
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "StringUtils.h"
|
||||
#include "WootingKeyboardController.h"
|
||||
|
||||
WootingKeyboardController::WootingKeyboardController()
|
||||
@@ -44,7 +45,15 @@ std::string WootingKeyboardController::GetDescription()
|
||||
|
||||
std::string WootingKeyboardController::GetSerial()
|
||||
{
|
||||
return serial;
|
||||
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));
|
||||
}
|
||||
|
||||
uint8_t WootingKeyboardController::GetWootingType()
|
||||
|
||||
Reference in New Issue
Block a user