mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Added workaround for corsair custom devices with wrongly reported channel counts
This commit is contained in:
parent
95eeef2d04
commit
eedeadabda
@ -156,7 +156,7 @@ namespace RGB.NET.Devices.Corsair
|
||||
int channelDeviceInfoStructSize = Marshal.SizeOf(typeof(_CorsairChannelDeviceInfo));
|
||||
IntPtr channelDeviceInfoPtr = channelInfo.devices;
|
||||
|
||||
for (int device = 0; device < channelInfo.devicesCount; device++)
|
||||
for (int device = 0; (device < channelInfo.devicesCount) && (ledOffset < nativeDeviceInfo.ledsCount); device++)
|
||||
{
|
||||
_CorsairChannelDeviceInfo channelDeviceInfo = (_CorsairChannelDeviceInfo)Marshal.PtrToStructure(channelDeviceInfoPtr, typeof(_CorsairChannelDeviceInfo))!;
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ namespace RGB.NET.Devices.Corsair
|
||||
switch (channelDeviceInfo.type)
|
||||
{
|
||||
case CorsairChannelDeviceType.Invalid:
|
||||
return "Invalid";
|
||||
return model;
|
||||
|
||||
case CorsairChannelDeviceType.FanHD:
|
||||
return "HD Fan";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user