mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-20 23:54:58 -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:
1 parent
366fda30f5
commit
b4d15b9545
159 files changed
+623
-930
No files matched your search
@@ -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