Use HID path for Location on AMD Wraith Prism controller
This commit is contained in:
parent
406ebcc789
commit
4df557391a
4 changed files with 13 additions and 4 deletions
|
|
@ -12,9 +12,10 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
AMDWraithPrismController::AMDWraithPrismController(hid_device* dev_handle)
|
||||
AMDWraithPrismController::AMDWraithPrismController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
|
||||
strcpy(device_name, "AMD Wraith Prism");
|
||||
|
||||
|
|
@ -38,6 +39,11 @@ AMDWraithPrismController::~AMDWraithPrismController()
|
|||
|
||||
}
|
||||
|
||||
std::string AMDWraithPrismController::GetLocationString()
|
||||
{
|
||||
return(location);
|
||||
}
|
||||
|
||||
char* AMDWraithPrismController::GetDeviceName()
|
||||
{
|
||||
return device_name;
|
||||
|
|
|
|||
|
|
@ -109,13 +109,14 @@ enum
|
|||
class AMDWraithPrismController
|
||||
{
|
||||
public:
|
||||
AMDWraithPrismController(hid_device* dev_handle);
|
||||
AMDWraithPrismController(hid_device* dev_handle, const char* path);
|
||||
~AMDWraithPrismController();
|
||||
|
||||
char* GetDeviceName();
|
||||
|
||||
std::string GetEffectChannelString(unsigned char channel);
|
||||
std::string GetFirmwareVersionString();
|
||||
std::string GetLocationString();
|
||||
|
||||
void SetRingEffectChannel(unsigned char channel);
|
||||
|
||||
|
|
@ -131,6 +132,7 @@ public:
|
|||
private:
|
||||
char device_name[32];
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
|
||||
unsigned char current_fan_mode;
|
||||
unsigned char current_fan_speed;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ void DetectAMDWraithPrismControllers(std::vector<RGBController*>& rgb_controller
|
|||
|
||||
if( dev )
|
||||
{
|
||||
AMDWraithPrismController* controller = new AMDWraithPrismController(dev);
|
||||
AMDWraithPrismController* controller = new AMDWraithPrismController(dev, info->path);
|
||||
|
||||
RGBController_AMDWraithPrism* rgb_controller = new RGBController_AMDWraithPrism(controller);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismControl
|
|||
type = DEVICE_TYPE_COOLER;
|
||||
description = "AMD Wraith Prism Device";
|
||||
version = wraith->GetFirmwareVersionString();
|
||||
location = wraith->GetLocationString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue