Store name in ValkyrieKeyboardController to avoid setting it in detector

This commit is contained in:
Adam Honse 2025-08-14 22:31:59 -05:00
parent fcce668d66
commit ef6241fe38
4 changed files with 57 additions and 50 deletions

View file

@ -14,12 +14,13 @@
#include "StringUtils.h"
#include "ValkyrieKeyboardController.h"
ValkyrieKeyboardController::ValkyrieKeyboardController(hid_device* dev_handle, const char* path, const unsigned short pid, const int interface)
ValkyrieKeyboardController::ValkyrieKeyboardController(hid_device* dev_handle, const char* path, const unsigned short pid, const int interface, std::string dev_name)
{
dev = dev_handle;
location = path;
usb_pid = pid;
interface_num = interface;
dev = dev_handle;
location = path;
name = dev_name;
usb_pid = pid;
interface_num = interface;
}
ValkyrieKeyboardController::~ValkyrieKeyboardController()
@ -32,6 +33,11 @@ std::string ValkyrieKeyboardController::GetDeviceLocation()
return("HID: " + location);
}
std::string ValkyrieKeyboardController::GetNameString()
{
return(name);
}
std::string ValkyrieKeyboardController::GetSerialString()
{
wchar_t serial_string[128];