Use HID path for Location on SteelSeries Siberia controller
This commit is contained in:
parent
0e7f2b9fc1
commit
dd29bc9905
4 changed files with 16 additions and 5 deletions
|
|
@ -13,9 +13,10 @@ RGBController_SteelSeriesSiberia::RGBController_SteelSeriesSiberia(SteelSeriesSi
|
|||
{
|
||||
siberia = siberia_ptr;
|
||||
|
||||
name = siberia_ptr->GetDeviceName();
|
||||
name = siberia->GetDeviceName();
|
||||
type = DEVICE_TYPE_HEADSET;
|
||||
description = "SteelSeries Siberia Device";
|
||||
location = siberia->GetDeviceLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void DetectSteelSeriesControllers(std::vector<RGBController*>& rgb_controllers)
|
|||
|
||||
case DEVICE_TYPE_HEADSET:
|
||||
{
|
||||
SteelSeriesSiberiaController* controller = new SteelSeriesSiberiaController(dev);
|
||||
SteelSeriesSiberiaController* controller = new SteelSeriesSiberiaController(dev, info->path);
|
||||
|
||||
RGBController_SteelSeriesSiberia* rgb_controller = new RGBController_SteelSeriesSiberia(controller);
|
||||
rgb_controller->name = device_list[device_idx].name;
|
||||
|
|
|
|||
|
|
@ -35,16 +35,23 @@ static void send_usb_msg(hid_device* dev, char * data_pkt, unsigned int size)
|
|||
|
||||
SteelSeriesSiberiaController::SteelSeriesSiberiaController
|
||||
(
|
||||
hid_device* dev_handle
|
||||
hid_device* dev_handle,
|
||||
const char* path
|
||||
)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
SteelSeriesSiberiaController::~SteelSeriesSiberiaController()
|
||||
{
|
||||
}
|
||||
|
||||
std::string SteelSeriesSiberiaController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
}
|
||||
|
||||
char* SteelSeriesSiberiaController::GetDeviceName()
|
||||
{
|
||||
return device_name;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,13 @@ class SteelSeriesSiberiaController
|
|||
public:
|
||||
SteelSeriesSiberiaController
|
||||
(
|
||||
hid_device* dev_handle
|
||||
hid_device* dev_handle,
|
||||
const char* path
|
||||
);
|
||||
|
||||
~SteelSeriesSiberiaController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
char* GetDeviceName();
|
||||
|
||||
void SetColor
|
||||
|
|
@ -34,4 +36,5 @@ public:
|
|||
private:
|
||||
char device_name[32];
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue