diff --git a/Controllers/HyperXMouseController/HyperXMouseControllerDetect.cpp b/Controllers/HyperXMouseController/HyperXMouseControllerDetect.cpp index 24385bc4..f4e52e4a 100644 --- a/Controllers/HyperXMouseController/HyperXMouseControllerDetect.cpp +++ b/Controllers/HyperXMouseController/HyperXMouseControllerDetect.cpp @@ -66,7 +66,7 @@ void DetectHyperXMouseControllers(std::vector& rgb_controllers) if( dev ) { - HyperXPulsefireSurgeController* controller = new HyperXPulsefireSurgeController(dev); + HyperXPulsefireSurgeController* controller = new HyperXPulsefireSurgeController(dev, info->path); RGBController_HyperXPulsefireSurge* rgb_controller = new RGBController_HyperXPulsefireSurge(controller); diff --git a/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.cpp b/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.cpp index e53ba458..eb8abdf3 100644 --- a/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.cpp +++ b/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.cpp @@ -11,9 +11,10 @@ #include -HyperXPulsefireSurgeController::HyperXPulsefireSurgeController(hid_device* dev_handle) +HyperXPulsefireSurgeController::HyperXPulsefireSurgeController(hid_device* dev_handle, const char* path) { - dev = dev_handle; + dev = dev_handle; + location = path; } HyperXPulsefireSurgeController::~HyperXPulsefireSurgeController() @@ -21,6 +22,11 @@ HyperXPulsefireSurgeController::~HyperXPulsefireSurgeController() } +std::string HyperXPulsefireSurgeController::GetDeviceLocation() +{ + return(location); +} + /*-------------------------------------------------------------------------------------------------*\ | Private packet sending functions. | \*-------------------------------------------------------------------------------------------------*/ diff --git a/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.h b/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.h index f0ef95c1..7f1d64ea 100644 --- a/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.h +++ b/Controllers/HyperXMouseController/HyperXPulsefireSurgeController.h @@ -34,9 +34,11 @@ enum class HyperXPulsefireSurgeController { public: - HyperXPulsefireSurgeController(hid_device* dev_handle); + HyperXPulsefireSurgeController(hid_device* dev_handle, const char* path); ~HyperXPulsefireSurgeController(); + std::string GetDeviceLocation(); + void SelectProfile ( unsigned char profile @@ -55,4 +57,5 @@ public: private: hid_device* dev; + std::string location; }; diff --git a/Controllers/HyperXMouseController/RGBController_HyperXPulsefireSurge.cpp b/Controllers/HyperXMouseController/RGBController_HyperXPulsefireSurge.cpp index 1c0a8771..d31e38f3 100644 --- a/Controllers/HyperXMouseController/RGBController_HyperXPulsefireSurge.cpp +++ b/Controllers/HyperXMouseController/RGBController_HyperXPulsefireSurge.cpp @@ -42,6 +42,7 @@ RGBController_HyperXPulsefireSurge::RGBController_HyperXPulsefireSurge(HyperXPul name = "HyperX Pulsefire Surge Device"; type = DEVICE_TYPE_MOUSE; description = "HyperX Pulsefire Surge Device"; + location = hyperx->GetDeviceLocation(); mode Direct; Direct.name = "Direct";