mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 14:14:17 -04:00
Store name in DuckyKeyboardController to avoid setting it in detector
This commit is contained in:
@@ -13,10 +13,11 @@
|
||||
#include "DuckyKeyboardController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
DuckyKeyboardController::DuckyKeyboardController(hid_device* dev_handle, const char* path, const unsigned short pid)
|
||||
DuckyKeyboardController::DuckyKeyboardController(hid_device* dev_handle, const char* path, const unsigned short pid, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
usb_pid = pid;
|
||||
|
||||
SendInitialize();
|
||||
@@ -27,11 +28,16 @@ DuckyKeyboardController::~DuckyKeyboardController()
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string DuckyKeyboardController::GetDeviceLocation()
|
||||
std::string DuckyKeyboardController::GetLocationString()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string DuckyKeyboardController::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string DuckyKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
||||
Reference in New Issue
Block a user