Store name in RedSquareControllers to avoid setting it in detectors

This commit is contained in:
Adam Honse
2025-08-14 19:32:37 -05:00
parent 06413f2877
commit 9680d072fa
7 changed files with 35 additions and 21 deletions

View File

@@ -15,10 +15,11 @@
using namespace std::chrono_literals;
RedSquareKeyroxController::RedSquareKeyroxController(hid_device *dev_handle, const hid_device_info &info, int variant)
RedSquareKeyroxController::RedSquareKeyroxController(hid_device *dev_handle, const hid_device_info &info, int variant, std::string dev_name)
{
dev = dev_handle;
location = info.path;
name = dev_name;
this->variant = variant;
}
@@ -37,6 +38,11 @@ std::string RedSquareKeyroxController::GetDeviceLocation()
return("HID: " + location);
}
std::string RedSquareKeyroxController::GetNameString()
{
return(name);
}
std::string RedSquareKeyroxController::GetSerialString()
{
wchar_t serial_wchar[128];