mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-22 00:25:04 -04:00
On Linux include both the I2C/SMBus bus name and device path in the device_name
This commit is contained in:
1 parent
77ff2a367c
commit
61d3bc0e98
2 files changed
+3
-2
No files matched your search
@@ -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