diff --git a/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs b/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs
index 3d4aacb..2caa03e 100644
--- a/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs
+++ b/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs
@@ -19,6 +19,7 @@ namespace RGB.NET.Devices.Logitech.HID
("G910", RGBDeviceType.Keyboard, 0xC32B, "DE", @"Keyboards\G910\UK"), //TODO DarthAffe 15.11.2017: Somehow detect the current layout
("G810", RGBDeviceType.Keyboard, 0xC337, "DE", @"Keyboards\G810\UK"),
("G610", RGBDeviceType.Keyboard, 0xC333, "DE", @"Keyboards\G610\UK"),
+ ("Pro", RGBDeviceType.Keyboard, 0xC339, "DE", @"Keyboards\Pro\UK"),
};
private static readonly List<(string model, RGBDeviceType deviceType, int id, string imageLayout, string layoutPath)> PER_DEVICE_DEVICES
@@ -27,6 +28,7 @@ namespace RGB.NET.Devices.Logitech.HID
("G903", RGBDeviceType.Mouse, 0xC086, "default", @"Mice\G903"),
("G403", RGBDeviceType.Mouse, 0xC083, "default", @"Mice\G403"),
("G502", RGBDeviceType.Mouse, 0xC332, "default", @"Mice\G502"),
+ ("G Pro", RGBDeviceType.Mouse, 0xC085, "default", @"Mice\GPro"),
};
#endregion
diff --git a/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/Pro/UK.xml b/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/Pro/UK.xml
new file mode 100644
index 0000000..4d42f84
--- /dev/null
+++ b/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/Pro/UK.xml
@@ -0,0 +1,189 @@
+
+
+ Logitech Pro Gaming Keyboard - Physical UK
+ Physical UK-Layout of Logitech Pro Gaming Keyboard (Logical: ???)
+ Darth Affe
+ Keyboard
+ Key
+ Logitech
+ Pro
+ 360
+ 152
+ Images\Logitech\Keyboards
+
+
+
+
+ 5
+ 28
+
+
+
+ +12.667
+
+
+
+
+
+
+ +12.667
+
+
+
+
+
+
+ +12.667
+
+
+
+
+
+
+ +6.75
+
+
+
+
+
+
+ 5
+ 52
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+ +6.75
+
+
+
+
+
+
+ 5
+ +
+ 1.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M0,0 L0,0.5 L0.16666666666,0.5 L0.16666666666,1 L1,1 L1,0 Z
+ 1.5
+ 2
+
+
+
+ +6.75
+
+
+
+
+
+
+ 5
+ +
+ 1.75
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ +
+ 1.25
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2.75
+
+
+
+ +25.75
+
+
+
+
+ 5
+ +
+ 1.5
+
+
+ 1.25
+
+
+ 1.25
+
+
+ 5.75
+
+
+ 1.25
+
+
+ 1.25
+
+
+ 1.25
+
+
+ 1.5
+
+
+
+ +6.75
+
+
+
+
+
+ M 0.43535,0.91509 c -0.083,-0.013 -0.1809,-0.0541 -0.24123,-0.11683 -0.21672,-0.2247 -0.10831,-0.63995 0.19645,-0.71442 0.044,-0.0108 0.44173,-0.0156 0.47505,-0.006 0.0632,0.0184 0.0708,0.15184 0.0119,0.18175 -0.0174,0.009 -0.0369,0.009 -0.21797,0.009 -0.23755,0 -0.25559,-0.002 -0.3144,0.067 -0.14073,0.16404 -0.0357,0.36697 0.16357,0.40076 0.0569,0.01 0.0835,0.0391 0.0831,0.0846 -4.5e-4,0.0636 -0.0621,0.10873 -0.15647,0.0941 z m 0.36491,6.7e-4 c -0.0366,-0.0138 -0.0539,-0.0325 -0.0567,-0.0973 -0.006,-0.14226 -0.0741,-0.23758 -0.21563,-0.24355 -0.0562,-0.003 -0.0629,-0.004 -0.0811,-0.0233 -0.0344,-0.0359 -0.021,-0.11984 0.0238,-0.14402 0.0129,-0.007 0.0145,-0.007 0.19631,-0.007 0.25897,0 0.25297,0.005 0.25151,0.27271 -8e-4,0.17441 -8e-4,0.19394 -0.0107,0.20972 -0.0183,0.0297 -0.0769,0.0443 -0.10753,0.0326 Z
+ 5
+ 5
+
+
+
\ No newline at end of file
diff --git a/RGB.NET.Devices.Logitech/PerKey/BitmapMapping.cs b/RGB.NET.Devices.Logitech/PerKey/BitmapMapping.cs
index 73d882b..cfb5cd9 100644
--- a/RGB.NET.Devices.Logitech/PerKey/BitmapMapping.cs
+++ b/RGB.NET.Devices.Logitech/PerKey/BitmapMapping.cs
@@ -156,7 +156,7 @@ namespace RGB.NET.Devices.Logitech
internal static byte[] CreateBitmap() => new byte[BITMAP_SIZE];
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal static void SetColor(ref byte[] bitmap, int offset, Color color)
+ internal static void SetColor(byte[] bitmap, int offset, Color color)
{
bitmap[offset] = color.B;
bitmap[offset + 1] = color.G;
diff --git a/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyUpdateQueue.cs b/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyUpdateQueue.cs
index 152cb8f..a14ef60 100644
--- a/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyUpdateQueue.cs
+++ b/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyUpdateQueue.cs
@@ -7,11 +7,19 @@ namespace RGB.NET.Devices.Logitech
{
public class LogitechPerKeyUpdateQueue : UpdateQueue
{
+ #region Properties & Fields
+
+ private readonly byte[] _bitmap;
+
+ #endregion
+
#region Constructors
public LogitechPerKeyUpdateQueue(IUpdateTrigger updateTrigger)
: base(updateTrigger)
- { }
+ {
+ _bitmap = BitmapMapping.CreateBitmap();
+ }
#endregion
@@ -22,28 +30,27 @@ namespace RGB.NET.Devices.Logitech
{
_LogitechGSDK.LogiLedSetTargetDevice(LogitechDeviceCaps.PerKeyRGB);
- byte[] bitmap = null;
+ Array.Clear(_bitmap, 0, _bitmap.Length);
+ bool usesBitmap = false;
foreach (KeyValuePair