mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-14 14:17:46 -04:00
Fix wstring to string conversion in CoolerMaster controllers
This commit is contained in:
1 parent
10e6e8c91f
commit
8f7e4963de
18 files changed
+173
-153
No files matched your search
+3
-4
@@ -10,6 +10,7 @@
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "CMKeyboardAbstractController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
CMKeyboardAbstractController::CMKeyboardAbstractController(hid_device* dev_handle, hid_device_info* dev_info)
|
||||
{
|
||||
@@ -20,12 +21,10 @@ CMKeyboardAbstractController::CMKeyboardAbstractController(hid_device* dev_handl
|
||||
m_sLocation = dev_info->path;
|
||||
|
||||
hid_get_manufacturer_string(m_pDev, tmp, HID_MAX_STR);
|
||||
std::wstring wVendorName = std::wstring(tmp);
|
||||
m_vendorName = std::string(wVendorName.begin(), wVendorName.end());
|
||||
m_vendorName = StringUtils::wstring_to_string(tmp);
|
||||
|
||||
hid_get_product_string(m_pDev, tmp, HID_MAX_STR);
|
||||
std::wstring wDeviceName = std::wstring(tmp);
|
||||
m_deviceName = std::string(wDeviceName.begin(), wDeviceName.end());
|
||||
m_deviceName = StringUtils::wstring_to_string(tmp);
|
||||
m_serialNumber = m_deviceName;
|
||||
|
||||
bool bNotFound = true;
|
||||
|
||||
Reference in new issue
Block a user