mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Added workaround for corsair custom devices with wrongly reported channel counts
This commit is contained in:
1 parent
95eeef2d04
commit
eedeadabda
2 files changed
+2
-2
No files matched your search
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user