Changed color to be an immutable value-type

This commit is contained in:
DarthAffe committed 2017-12-04 10:13:58 +01:00
1 parent b9e443b3b6
commit 50cfd296be
16 files changed
+1014 -410

No files matched your search

@@ -151,7 +151,7 @@ namespace RGB.NET.Devices.Corsair
for (int i = 0; i < LedMapping.Count; i++)
{
_CorsairLedColor ledColor = (_CorsairLedColor)Marshal.PtrToStructure(readPtr, typeof(_CorsairLedColor));
colorData.Add((CorsairLedIds)ledColor.ledId, new Color((byte)ledColor.r, (byte)ledColor.g, (byte)ledColor.b));
colorData.Add((CorsairLedIds)ledColor.ledId, new Color(ledColor.r, ledColor.g, ledColor.b));
readPtr = new IntPtr(readPtr.ToInt64() + structSize);
}