Added check to prevent updates of unmapped leds on logitech devices

This commit is contained in:
DarthAffe committed 2021-04-02 21:48:10 +02:00
1 parent 7f3abaefec
commit f8d007b7cd
1 file changed
+5 -1
@@ -38,7 +38,11 @@ namespace RGB.NET.Devices.Logitech
Array.Clear(_bitmap, 0, _bitmap.Length);
foreach ((object key, Color color) in dataSet)
BitmapMapping.SetColor(_bitmap, (int)key, color);
{
int offset = key as int? ?? -1;
if (offset >= 0)
BitmapMapping.SetColor(_bitmap, offset, color);
}
_LogitechGSDK.LogiLedSetLightingFromBitmap(_bitmap);
}