Store name in CherryKeyboardController to avoid setting it in detector

This commit is contained in:
Adam Honse 2025-08-04 14:04:27 -05:00
parent c761661386
commit 2ec68c29de
4 changed files with 13 additions and 5 deletions

View file

@ -13,10 +13,11 @@
#include "CherryKeyboardController.h"
#include "StringUtils.h"
CherryKeyboardController::CherryKeyboardController(hid_device* dev_handle, const char* path)
CherryKeyboardController::CherryKeyboardController(hid_device* dev_handle, const char* path, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
}
CherryKeyboardController::~CherryKeyboardController()
@ -29,6 +30,11 @@ std::string CherryKeyboardController::GetDeviceLocation()
return("HID: " + location);
}
std::string CherryKeyboardController::GetDeviceName()
{
return(name);
}
std::string CherryKeyboardController::GetSerialString()
{
wchar_t serial_string[128];