Store name in MSIGPUv2Controller to avoid setting it in detector

This commit is contained in:
Adam Honse
2025-08-15 16:57:02 -05:00
parent 5db766cfa0
commit 5190274004
5 changed files with 63 additions and 57 deletions

View File

@@ -30,13 +30,11 @@ void DetectMSIGPUv2Controllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const
return;
}
int msi_gpu_id = bus->pci_subsystem_device | bus->pci_device << 16;
MSIGPUv2Controller* controller = new MSIGPUv2Controller(bus, i2c_addr);
RGBController_MSIGPUv2* rgb_controller = new RGBController_MSIGPUv2(controller, msi_gpu_id);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
LOG_TRACE("MSI GPU Controler using ITE9 chip");
int msi_gpu_id = bus->pci_subsystem_device | bus->pci_device << 16;
MSIGPUv2Controller* controller = new MSIGPUv2Controller(bus, i2c_addr, name);
RGBController_MSIGPUv2* rgb_controller = new RGBController_MSIGPUv2(controller, msi_gpu_id);
ResourceManager::get()->RegisterRGBController(rgb_controller);
} /* DetectMSIGPUv2Controllers() */
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 4060 Gaming X", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4060_DEV, MSI_SUB_VEN, MSI_RTX4060_GAMING_X_8G_SUB_DEV, 0x68);