Store name in SonyDualSenseController to avoid setting it in detector

This commit is contained in:
Adam Honse
2025-08-14 20:08:31 -05:00
parent 517287117b
commit 840512751c
4 changed files with 47 additions and 37 deletions

View File

@@ -15,11 +15,12 @@
#include "SonyDualSenseController.h"
#include "StringUtils.h"
SonyDualSenseController::SonyDualSenseController(hid_device * device_handle, const char * device_path, bool is_bluetooth)
SonyDualSenseController::SonyDualSenseController(hid_device * device_handle, const char * device_path, bool is_bluetooth, std::string dev_name)
{
dev = device_handle;
location = device_path;
this->is_bluetooth = is_bluetooth;
dev = device_handle;
location = device_path;
name = dev_name;
this->is_bluetooth = is_bluetooth;
}
SonyDualSenseController::~SonyDualSenseController()
@@ -32,6 +33,11 @@ std::string SonyDualSenseController::GetLocation()
return("HID: " + location);
}
std::string SonyDualSenseController::GetName()
{
return(name);
}
std::string SonyDualSenseController::GetSerialString()
{
wchar_t serial_string[128];