mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-29 19:31:08 -04:00
Fix wstring to string conversion warnings in AlienwareAW510KController.cpp
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include "AlienwareAW510KController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AlienwareAW510KController::AlienwareAW510KController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
@@ -33,12 +34,14 @@ std::string AlienwareAW510KController::GetDeviceLocation()
|
||||
std::string AlienwareAW510KController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
hid_get_serial_number_string(dev, serial_string, 128);
|
||||
int ret = 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());
|
||||
if(ret != 0)
|
||||
{
|
||||
return("");
|
||||
}
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void AlienwareAW510KController::SendCommit()
|
||||
|
||||
Reference in New Issue
Block a user