Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CorsairGenericDevice.cs
Go to the documentation of this file.
1using System;
3
5
7{
8 private readonly CorsairLedColor[] _ledColors;
9
10 protected CorsairGenericDevice(RgbDeviceType deviceType, Fragment fragment, CorsairLedPosition[] ledPositions, DeviceColorProfile colorProfile)
11 : base(RgbDeviceVendor.Corsair, deviceType, fragment, colorProfile)
12 {
13 _ledColors = new CorsairLedColor[base.LedCount];
14 for (int i = 0; i < ledPositions.Length; i++)
15 {
16 _ledColors[i].LedId = ledPositions[i].LedId;
17 }
18 }
19
20 public override void Present()
21 {
22 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
23 //IL_000b: Unknown result type (might be due to invalid IL or missing references)
24 //IL_0018: Unknown result type (might be due to invalid IL or missing references)
25 //IL_0036: Unknown result type (might be due to invalid IL or missing references)
26 //IL_0054: Unknown result type (might be due to invalid IL or missing references)
27 for (int i = 0; i < base.LedCount; i++)
28 {
29 Vector4 processedLedColor = GetProcessedLedColor(i);
30 _ledColors[i].R = (int)(processedLedColor.X * 255f);
31 _ledColors[i].G = (int)(processedLedColor.Y * 255f);
32 _ledColors[i].B = (int)(processedLedColor.Z * 255f);
33 }
34 if (_ledColors.Length != 0)
35 {
37 }
38 }
39}
CorsairGenericDevice(RgbDeviceType deviceType, Fragment fragment, CorsairLedPosition[] ledPositions, DeviceColorProfile colorProfile)
static bool CorsairSetLedsColorsAsync(int size, [In][Out] CorsairLedColor[] ledsColors, IntPtr callback, IntPtr context)
Vector4 GetProcessedLedColor(int index)
Definition RgbDevice.cs:37
static readonly IntPtr Zero
Definition IntPtr.cs:18