diff --git a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs index b1e435c..d548a0b 100644 --- a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs @@ -60,7 +60,7 @@ namespace RGB.NET.Devices.Logitech string basePath = info.ImageBasePath; string layout = info.ImageLayout; string layoutPath = info.LayoutPath; - ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Logitech\{basePath}\{layoutPath}.xml"), layout, PathHelper.GetAbsolutePath($@"Images\Logitech\{basePath}")); + ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Logitech\{layoutPath}.xml"), layout, PathHelper.GetAbsolutePath($@"Images\Logitech\{basePath}")); } /// diff --git a/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs b/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs index 0204e45..00a2cba 100644 --- a/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs +++ b/RGB.NET.Devices.Logitech/HID/DeviceChecker.cs @@ -11,19 +11,19 @@ namespace RGB.NET.Devices.Logitech.HID #region Constants private const int VENDOR_ID = 0x046D; - + //TODO DarthAffe 14.11.2017: Add devices private static readonly List<(string model, RGBDeviceType deviceType, int id, string imageBasePath, string imageLayout, string layoutPath)> PER_KEY_DEVICES = new List<(string model, RGBDeviceType deviceType, int id, string imageBasePath, string imageLayout, string layoutPath)> { - ("G910", RGBDeviceType.Keyboard, 0xC32B, "", "", ""), - ("G910", RGBDeviceType.Keyboard, 0xC333, "", "", ""), + ("G910", RGBDeviceType.Keyboard, 0xC32B, "Keyboards", "DE", @"Keyboards\G910\UK"), //TODO DarthAffe 15.11.2017: Somehow detect the current layout + ("G610", RGBDeviceType.Keyboard, 0xC333, "Keyboards", "DE", @"Keyboards\G610\UK"), }; private static readonly List<(string model, RGBDeviceType deviceType, int id, string imageBasePath, string imageLayout, string layoutPath)> PER_DEVICE_DEVICES = new List<(string model, RGBDeviceType deviceType, int id, string imageBasePath, string imageLayout, string layoutPath)> { - ("G403", RGBDeviceType.Mouse, 0xC083, "", "", ""), + ("G403", RGBDeviceType.Mouse, 0xC083, "Mice", "default", @"Mice\G403"), }; #endregion diff --git a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs index 128bf52..8f1392d 100644 --- a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs +++ b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs @@ -8,7 +8,6 @@ using System.Globalization; using RGB.NET.Core; using RGB.NET.Devices.Logitech.HID; using RGB.NET.Devices.Logitech.Native; -using RGB.NET.Devices.Logitech.PerKey; namespace RGB.NET.Devices.Logitech { @@ -102,13 +101,15 @@ namespace RGB.NET.Devices.Logitech { (string model, RGBDeviceType deviceType, int _, string imageBasePath, string imageLayout, string layoutPath) = DeviceChecker.PerKeyDeviceData; LogitechRGBDevice device = new LogitechPerKeyRGBDevice(new LogitechRGBDeviceInfo(deviceType, model, LogitechDeviceCaps.PerKeyRGB, imageBasePath, imageLayout, layoutPath)); + device.Initialize(); devices.Add(device); } if (DeviceChecker.IsPerDeviceDeviceConnected) { (string model, RGBDeviceType deviceType, int _, string imageBasePath, string imageLayout, string layoutPath) = DeviceChecker.PerDeviceDeviceData; - LogitechRGBDevice device = new LogitechPerKeyRGBDevice(new LogitechRGBDeviceInfo(deviceType, model, LogitechDeviceCaps.DeviceRGB, imageBasePath, imageLayout, layoutPath)); + LogitechRGBDevice device = new LogitechPerDeviceRGBDevice(new LogitechRGBDeviceInfo(deviceType, model, LogitechDeviceCaps.DeviceRGB, imageBasePath, imageLayout, layoutPath)); + device.Initialize(); devices.Add(device); } diff --git a/RGB.NET.Devices.Logitech/PerDevice/LogitechPerDeviceRGBDevice.cs b/RGB.NET.Devices.Logitech/PerDevice/LogitechPerDeviceRGBDevice.cs index 5dc4b36..4f132ae 100644 --- a/RGB.NET.Devices.Logitech/PerDevice/LogitechPerDeviceRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/PerDevice/LogitechPerDeviceRGBDevice.cs @@ -4,7 +4,7 @@ using System.Linq; using RGB.NET.Core; using RGB.NET.Devices.Logitech.Native; -namespace RGB.NET.Devices.Logitech.PerDevice +namespace RGB.NET.Devices.Logitech { /// /// @@ -44,7 +44,7 @@ namespace RGB.NET.Devices.Logitech.PerDevice base.InitializeLayout(); if (LedMapping.Count == 0) - InitializeLed(new LogitechLedId(this, LogitechLedIds.DEVICE), new Rectangle(0, 0, 1, 1)); + InitializeLed(new LogitechLedId(this, LogitechLedIds.DEVICE), new Rectangle(0, 0, 10, 10)); } /// diff --git a/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs b/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs index d9c17c1..ffbdc72 100644 --- a/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs @@ -4,7 +4,7 @@ using System.Linq; using RGB.NET.Core; using RGB.NET.Devices.Logitech.Native; -namespace RGB.NET.Devices.Logitech.PerKey +namespace RGB.NET.Devices.Logitech { /// /// diff --git a/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings b/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings index c34eb1a..742b199 100644 --- a/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings +++ b/RGB.NET.Devices.Logitech/RGB.NET.Devices.Logitech.csproj.DotSettings @@ -3,4 +3,6 @@ True True True - True \ No newline at end of file + True + True + True \ No newline at end of file