mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Compare commits
No commits in common. "b4bbc6a3437ced247913d1cf702f1596a3f3c475" and "fd6bfa05e3e5097ede225ca7a1b9a30ff986486e" have entirely different histories.
b4bbc6a343
...
fd6bfa05e3
@ -2,7 +2,6 @@
|
|||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
using RGB.NET.Devices.CorsairLegacy.Native;
|
using RGB.NET.Devices.CorsairLegacy.Native;
|
||||||
@ -60,21 +59,6 @@ public class CorsairCustomRGBDevice : CorsairRGBDevice<CorsairCustomRGBDeviceInf
|
|||||||
|
|
||||||
ptr = new IntPtr(ptr.ToInt64() + structSize);
|
ptr = new IntPtr(ptr.ToInt64() + structSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DeviceInfo.LedOffset > 0)
|
|
||||||
FixOffsetDeviceLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Fixes the locations for devices split by offset by aligning them to the top left.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual void FixOffsetDeviceLayout()
|
|
||||||
{
|
|
||||||
float minX = this.Min(x => x.Location.X);
|
|
||||||
float minY = this.Min(x => x.Location.Y);
|
|
||||||
|
|
||||||
foreach (Led led in this)
|
|
||||||
led.Location = led.Location.Translate(-minX, -minY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LedId GetReferenceLed(RGBDeviceType deviceType)
|
private static LedId GetReferenceLed(RGBDeviceType deviceType)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user