1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Added check to prevent updates of unmapped leds on logitech devices

This commit is contained in:
Darth Affe 2021-04-02 21:48:10 +02:00
parent 7f3abaefec
commit f8d007b7cd

View File

@ -38,7 +38,11 @@ namespace RGB.NET.Devices.Logitech
Array.Clear(_bitmap, 0, _bitmap.Length); Array.Clear(_bitmap, 0, _bitmap.Length);
foreach ((object key, Color color) in dataSet) 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); _LogitechGSDK.LogiLedSetLightingFromBitmap(_bitmap);
} }