mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-23 23:37:48 -05:00
On Linux include both the I2C/SMBus bus name and device path in the device_name
This commit is contained in:
@@ -232,7 +232,7 @@ bool i2c_smbus_linux_detect()
|
||||
}
|
||||
|
||||
bus = new i2c_smbus_linux();
|
||||
strcpy(bus->device_name, device_string);
|
||||
snprintf(bus->device_name, sizeof(bus->device_name), "%s (%s)", device_string, device_path);
|
||||
bus->handle = test_fd;
|
||||
bus->pci_device = pci_device;
|
||||
bus->pci_vendor = pci_vendor;
|
||||
|
||||
@@ -30,7 +30,8 @@ inline bool is_amd_gpu_i2c_bus(const i2c_smbus_interface *bus)
|
||||
size_t idx = 0;
|
||||
while((name = RECOGNIZED_I2C_BUS_NAMES[idx++]) != nullptr)
|
||||
{
|
||||
if(std::strcmp(name, bus->device_name) == 0)
|
||||
const char *pos = std::strstr(bus->device_name, name);
|
||||
if(pos == bus->device_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user