diff --git a/Controllers/MSI3ZoneController/MSI3ZoneControllerDetect.cpp b/Controllers/MSI3ZoneController/MSI3ZoneControllerDetect.cpp index 9b254be5..78cdd154 100644 --- a/Controllers/MSI3ZoneController/MSI3ZoneControllerDetect.cpp +++ b/Controllers/MSI3ZoneController/MSI3ZoneControllerDetect.cpp @@ -19,11 +19,13 @@ void DetectMSI3ZoneControllers(hid_device_info* info, const std::string&) { hid_device* dev = hid_open_path(info->path); - if( dev ) + + if(dev) { - MSI3ZoneController* controller = new MSI3ZoneController(dev, info->path); + MSI3ZoneController* controller = new MSI3ZoneController(dev, info->path); RGBController_MSI3Zone* rgb_controller = new RGBController_MSI3Zone(controller); // Constructor sets the name + ResourceManager::get()->RegisterRGBController(rgb_controller); } } /* DetectMSI3ZoneControllers() */ diff --git a/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp b/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp index 73801c2b..67d4f512 100644 --- a/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp +++ b/Controllers/MSI3ZoneController/RGBController_MSI3Zone.cpp @@ -9,16 +9,16 @@ #include "RGBController_MSI3Zone.h" -RGBController_MSI3Zone::RGBController_MSI3Zone(MSI3ZoneController* msi_ptr) +RGBController_MSI3Zone::RGBController_MSI3Zone(MSI3ZoneController* controller_ptr) { - msi = msi_ptr; + controller = controller_ptr; name = "MSI 3-Zone Keyboard"; vendor = "MSI"; type = DEVICE_TYPE_KEYBOARD; description = "MSI 3-Zone Keyboard Device"; - location = msi->GetDeviceLocation(); - serial = msi->GetSerialString(); + location = controller->GetDeviceLocation(); + serial = controller->GetSerialString(); mode Direct; Direct.name = "Direct"; @@ -32,7 +32,7 @@ RGBController_MSI3Zone::RGBController_MSI3Zone(MSI3ZoneController* msi_ptr) RGBController_MSI3Zone::~RGBController_MSI3Zone() { - delete msi; + delete controller; } void RGBController_MSI3Zone::SetupZones() @@ -89,17 +89,17 @@ void RGBController_MSI3Zone::ResizeZone(int /*zone*/, int /*new_size*/) void RGBController_MSI3Zone::DeviceUpdateLEDs() { - msi->SetLEDs(colors); + controller->SetLEDs(colors); } void RGBController_MSI3Zone::UpdateZoneLEDs(int /*zone*/) { - msi->SetLEDs(colors); + controller->SetLEDs(colors); } void RGBController_MSI3Zone::UpdateSingleLED(int /*led*/) { - msi->SetLEDs(colors); + controller->SetLEDs(colors); } void RGBController_MSI3Zone::SetCustomMode() diff --git a/Controllers/MSI3ZoneController/RGBController_MSI3Zone.h b/Controllers/MSI3ZoneController/RGBController_MSI3Zone.h index bac1eaa1..d1a1d645 100644 --- a/Controllers/MSI3ZoneController/RGBController_MSI3Zone.h +++ b/Controllers/MSI3ZoneController/RGBController_MSI3Zone.h @@ -14,7 +14,7 @@ class RGBController_MSI3Zone : public RGBController { public: - RGBController_MSI3Zone(MSI3ZoneController* msi_ptr); + RGBController_MSI3Zone(MSI3ZoneController* controller_ptr); ~RGBController_MSI3Zone(); void SetupZones(); @@ -29,5 +29,5 @@ public: void DeviceUpdateMode(); private: - MSI3ZoneController* msi; + MSI3ZoneController* controller; };