Store name in AsusAuraGPUController to avoid setting it in detector
This commit is contained in:
parent
0665ded648
commit
e928111c00
3 changed files with 8 additions and 10 deletions
|
|
@ -13,12 +13,11 @@
|
||||||
#include "AsusAuraGPUController.h"
|
#include "AsusAuraGPUController.h"
|
||||||
#include "pci_ids.h"
|
#include "pci_ids.h"
|
||||||
|
|
||||||
AuraGPUController::AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id dev)
|
AuraGPUController::AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id dev, std::string dev_name)
|
||||||
{
|
{
|
||||||
this->bus = bus;
|
this->bus = bus;
|
||||||
this->dev = dev;
|
this->dev = dev;
|
||||||
|
this->name = dev_name;
|
||||||
strcpy(device_name, "ASUS Aura GPU"); // Would be nice to get the actual GPU name. Using this as a placeholder.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AuraGPUController::~AuraGPUController()
|
AuraGPUController::~AuraGPUController()
|
||||||
|
|
@ -28,7 +27,7 @@ AuraGPUController::~AuraGPUController()
|
||||||
|
|
||||||
std::string AuraGPUController::GetDeviceName()
|
std::string AuraGPUController::GetDeviceName()
|
||||||
{
|
{
|
||||||
return(device_name);
|
return(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AuraGPUController::GetDeviceLocation()
|
std::string AuraGPUController::GetDeviceLocation()
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ enum
|
||||||
class AuraGPUController
|
class AuraGPUController
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id);
|
AuraGPUController(i2c_smbus_interface* bus, aura_gpu_dev_id, std::string dev_name);
|
||||||
~AuraGPUController();
|
~AuraGPUController();
|
||||||
|
|
||||||
std::string GetDeviceName();
|
std::string GetDeviceName();
|
||||||
|
|
@ -62,7 +62,7 @@ public:
|
||||||
bool direct = false; // Temporary solution to check if we are in "Direct" mode
|
bool direct = false; // Temporary solution to check if we are in "Direct" mode
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char device_name[16];
|
|
||||||
i2c_smbus_interface * bus;
|
i2c_smbus_interface * bus;
|
||||||
aura_gpu_dev_id dev;
|
aura_gpu_dev_id dev;
|
||||||
|
std::string name;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,8 @@ void DetectAsusAuraGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, co
|
||||||
{
|
{
|
||||||
if(TestForAsusAuraGPUController(bus, i2c_addr))
|
if(TestForAsusAuraGPUController(bus, i2c_addr))
|
||||||
{
|
{
|
||||||
AuraGPUController* controller = new AuraGPUController(bus, i2c_addr);
|
AuraGPUController* controller = new AuraGPUController(bus, i2c_addr, name);
|
||||||
RGBController_AuraGPU* rgb_controller = new RGBController_AuraGPU(controller);
|
RGBController_AuraGPU* rgb_controller = new RGBController_AuraGPU(controller);
|
||||||
rgb_controller->name = name;
|
|
||||||
|
|
||||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue