MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / GetSerial

Method GetSerial

Controllers/RoccatController/RoccatKovaController.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32std::string RoccatKovaController::GetSerial()
33{
34 const uint8_t sz = ROCCAT_KOVA_HID_MAX_STR;
35 wchar_t tmp[sz];
36
37 uint8_t ret = hid_get_serial_number_string(dev, tmp, sz);
38
39 if(ret != 0)
40 {
41 LOG_DEBUG("[Roccat Kova] Get HID Serial string failed");
42 return "";
43 }
44
45 std::wstring w_tmp = std::wstring(tmp);
46 std::string serial = std::string(w_tmp.begin(), w_tmp.end());
47
48 return serial;
49}
50
51std::string RoccatKovaController::GetFirmwareVersion()
52{

Calls 3

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected