diff --git a/RGB.NET.Devices.Asus_Legacy/AsusDeviceProvider.cs b/RGB.NET.Devices.Asus_Legacy/AsusDeviceProvider.cs
deleted file mode 100644
index 6dbae09..0000000
--- a/RGB.NET.Devices.Asus_Legacy/AsusDeviceProvider.cs
+++ /dev/null
@@ -1,280 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable UnusedMember.Global
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.InteropServices;
-using RGB.NET.Core;
-using RGB.NET.Devices.Asus.Native;
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- ///
- /// Represents a device provider responsible for Cooler Master devices.
- ///
- [Obsolete("Use this only if you need syncback-capability")]
- public class AsusDeviceProvider : IRGBDeviceProvider
- {
- #region Properties & Fields
-
- private static AsusDeviceProvider _instance;
- ///
- /// Gets the singleton instance.
- ///
- public static AsusDeviceProvider Instance => _instance ?? new AsusDeviceProvider();
-
- ///
- /// Gets a modifiable list of paths used to find the native SDK-dlls for x86 applications.
- /// The first match will be used.
- ///
- public static List PossibleX86NativePaths { get; } = new List { "x86/AURA_SDK.dll" };
-
- ///
- /// Gets a modifiable list of paths used to find the native SDK-dlls for x64 applications.
- /// The first match will be used.
- ///
- public static List PossibleX64NativePaths { get; } = new List { };
-
- ///
- ///
- /// Indicates if the SDK is initialized and ready to use.
- ///
- public bool IsInitialized { get; private set; }
-
- ///
- /// Gets the loaded architecture (x64/x86).
- ///
- public string LoadedArchitecture => _AsusSDK.LoadedArchitecture;
-
- ///
- ///
- /// Gets whether the application has exclusive access to the SDK or not.
- ///
- public bool HasExclusiveAccess { get; private set; }
-
- ///
- public IEnumerable Devices { get; private set; }
-
- ///
- /// Gets or sets a function to get the culture for a specific device.
- ///
- // ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
- public Func GetCulture { get; set; } = CultureHelper.GetCurrentCulture;
-
- ///
- /// The used to trigger the updates for asus devices.
- ///
- public DeviceUpdateTrigger UpdateTrigger { get; private set; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// Thrown if this constructor is called even if there is already an instance of this class.
- public AsusDeviceProvider()
- {
- if (_instance != null) throw new InvalidOperationException($"There can be only one instance of type {nameof(AsusDeviceProvider)}");
- _instance = this;
-
- UpdateTrigger = new DeviceUpdateTrigger();
- }
-
- #endregion
-
- #region Methods
-
- ///
- public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
- {
- IsInitialized = false;
-
- try
- {
- UpdateTrigger?.Stop();
-
- _AsusSDK.Reload();
-
- IList devices = new List();
-
- #region Mainboard
-
- if (loadFilter.HasFlag(RGBDeviceType.Mainboard))
- try
- {
- //TODO DarthAffe 26.11.2017: This is not a fix! There might really be a second controller on the mainboard, but for now this should prevent the random crash for some guys.
- // DarthAffe 26.11.2017: https://rog.asus.com/forum/showthread.php?97754-Access-Violation-Wrong-EnumerateMB-Result&p=688901#post688901
- int mainboardCount = Math.Min(1, _AsusSDK.EnumerateMbController(IntPtr.Zero, 0));
- if (mainboardCount > 0)
- {
- IntPtr mainboardHandles = Marshal.AllocHGlobal(mainboardCount * IntPtr.Size);
- _AsusSDK.EnumerateMbController(mainboardHandles, mainboardCount);
-
- for (int i = 0; i < mainboardCount; i++)
- {
- try
- {
- IntPtr handle = Marshal.ReadIntPtr(mainboardHandles, i);
- _AsusSDK.SetMbMode(handle, 1);
- AsusMainboardRGBDevice device = new AsusMainboardRGBDevice(new AsusMainboardRGBDeviceInfo(RGBDeviceType.Mainboard, handle));
- device.Initialize(UpdateTrigger);
- devices.Add(device);
- }
- catch { if (throwExceptions) throw; }
- }
- }
- }
- catch { if (throwExceptions) throw; }
-
- #endregion
-
- #region Graphics cards
-
- //TODO DarthAffe 21.10.2017: This somehow returns non-existant gpus (at least for me) which cause huge lags (if a real asus-ready gpu is connected this doesn't happen)
-
- if (loadFilter.HasFlag(RGBDeviceType.GraphicsCard))
- try
- {
- int graphicCardCount = _AsusSDK.EnumerateGPU(IntPtr.Zero, 0);
- if (graphicCardCount > 0)
- {
- IntPtr grapicsCardHandles = Marshal.AllocHGlobal(graphicCardCount * IntPtr.Size);
- _AsusSDK.EnumerateGPU(grapicsCardHandles, graphicCardCount);
-
- for (int i = 0; i < graphicCardCount; i++)
- {
- try
- {
- IntPtr handle = Marshal.ReadIntPtr(grapicsCardHandles, i);
- _AsusSDK.SetGPUMode(handle, 1);
- AsusGraphicsCardRGBDevice device = new AsusGraphicsCardRGBDevice(new AsusGraphicsCardRGBDeviceInfo(RGBDeviceType.GraphicsCard, handle));
- device.Initialize(UpdateTrigger);
- devices.Add(device);
- }
- catch { if (throwExceptions) throw; }
- }
- }
- }
- catch { if (throwExceptions) throw; }
-
- #endregion
-
- #region DRAM
-
- //TODO DarthAffe 29.10.2017: I don't know why they are even documented, but the asus guy said they aren't in the SDK right now.
- //try
- //{
- //int dramCount = _AsusSDK.EnumerateDram(IntPtr.Zero, 0);
- //if (dramCount > 0)
- //{
- // IntPtr dramHandles = Marshal.AllocHGlobal(dramCount * IntPtr.Size);
- // _AsusSDK.EnumerateDram(dramHandles, dramCount);
-
- // for (int i = 0; i < dramCount; i++)
- // {
- //try
- //{
- // IntPtr handle = Marshal.ReadIntPtr(dramHandles, i);
- // _AsusSDK.SetDramMode(handle, 1);
- // AsusDramRGBDevice device = new AsusDramRGBDevice(new AsusDramRGBDeviceInfo(RGBDeviceType.DRAM, handle));
- // device.Initialize(UpdateTrigger);
- // devices.Add(device);
- // }
- //catch { if (throwExceptions) throw; }
- // }
- //}
- //}
- // catch { if (throwExceptions) throw; }
-
- #endregion
-
- #region Keyboard
-
- if (loadFilter.HasFlag(RGBDeviceType.Keyboard))
- try
- {
- IntPtr keyboardHandle = Marshal.AllocHGlobal(IntPtr.Size);
- if (_AsusSDK.CreateClaymoreKeyboard(keyboardHandle))
- {
- _AsusSDK.SetClaymoreKeyboardMode(keyboardHandle, 1);
- AsusKeyboardRGBDevice device = new AsusKeyboardRGBDevice(new AsusKeyboardRGBDeviceInfo(RGBDeviceType.Keyboard, keyboardHandle, GetCulture()));
- device.Initialize(UpdateTrigger);
- devices.Add(device);
- }
- }
- catch { if (throwExceptions) throw; }
-
- #endregion
-
- #region Mouse
-
- if (loadFilter.HasFlag(RGBDeviceType.Mouse))
- try
- {
- IntPtr mouseHandle = Marshal.AllocHGlobal(IntPtr.Size);
- if (_AsusSDK.CreateRogMouse(mouseHandle))
- {
- _AsusSDK.SetRogMouseMode(mouseHandle, 1);
- AsusMouseRGBDevice device = new AsusMouseRGBDevice(new AsusMouseRGBDeviceInfo(RGBDeviceType.Mouse, mouseHandle));
- device.Initialize(UpdateTrigger);
- devices.Add(device);
- }
- }
- catch { if (throwExceptions) throw; }
-
- #endregion
-
- UpdateTrigger?.Start();
-
- Devices = new ReadOnlyCollection(devices);
- IsInitialized = true;
- }
- catch
- {
- if (throwExceptions)
- throw;
- return false;
- }
-
- return true;
- }
-
- ///
- public void ResetDevices()
- {
- foreach (IRGBDevice device in Devices)
- {
- AsusRGBDeviceInfo deviceInfo = (AsusRGBDeviceInfo)device.DeviceInfo;
- switch (deviceInfo.DeviceType)
- {
- case RGBDeviceType.Mainboard:
- _AsusSDK.SetMbMode(deviceInfo.Handle, 0);
- break;
- case RGBDeviceType.GraphicsCard:
- _AsusSDK.SetGPUMode(deviceInfo.Handle, 0);
- break;
- //case RGBDeviceType.DRAM:
- // _AsusSDK.SetDramMode(deviceInfo.Handle, 0);
- // break;
- }
- }
- }
-
- ///
- public void Dispose()
- {
- try { UpdateTrigger?.Dispose(); }
- catch { /* at least we tried */ }
-
- try { _AsusSDK.UnloadAsusSDK(); }
- catch { /* at least we tried */ }
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/AsusDeviceProviderLoader.cs b/RGB.NET.Devices.Asus_Legacy/AsusDeviceProviderLoader.cs
deleted file mode 100644
index 576dfb5..0000000
--- a/RGB.NET.Devices.Asus_Legacy/AsusDeviceProviderLoader.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using RGB.NET.Core;
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- /// Represents a device provider loaded used to dynamically load asus devices into an application.
- ///
- public class AsusDeviceProviderLoader : IRGBDeviceProviderLoader
- {
- #region Properties & Fields
-
- ///
- public bool RequiresInitialization => false;
-
- #endregion
-
- #region Methods
-
- ///
- public IRGBDeviceProvider GetDeviceProvider() => AsusDeviceProvider.Instance;
-
- #endregion
- }
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/Dram/AsusDramRGBDevice.cs b/RGB.NET.Devices.Asus_Legacy/Dram/AsusDramRGBDevice.cs
deleted file mode 100644
index 6cdc398..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Dram/AsusDramRGBDevice.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//using RGB.NET.Core;
-//using RGB.NET.Devices.Asus.Native;
-
-//namespace RGB.NET.Devices.Asus
-//{
-// ///
-// ///
-// /// Represents a Asus dram.
-// ///
-// public class AsusDramRGBDevice : AsusRGBDevice
-// {
-// #region Properties & Fields
-
-// ///
-// /// Gets information about the .
-// ///
-// public AsusDramRGBDeviceInfo DramDeviceInfo { get; }
-
-// #endregion
-
-// #region Constructors
-
-// ///
-// ///
-// /// Initializes a new instance of the class.
-// ///
-// /// The specific information provided by Asus for the DRAM.
-// internal AsusDramRGBDevice(AsusDramRGBDeviceInfo info)
-// : base(info)
-// {
-// this.DramDeviceInfo = info;
-// }
-
-// #endregion
-
-// #region Methods
-
-// ///
-// protected override void InitializeLayout()
-// {
-// //TODO DarthAffe 21.10.2017: Look for a good default layout
-// int ledCount = _AsusSDK.GetGPULedCount(DramDeviceInfo.Handle);
-// for (int i = 0; i < ledCount; i++)
-// InitializeLed(new AsusLedId(this, AsusLedIds.DramLed1 + i, i), new Rectangle(i * 10, 0, 10, 10));
-
-// //TODO DarthAffe 21.10.2017: We don't know the model, how to save layouts and images?
-// ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Asus\Drams\{DramDeviceInfo.Model.Replace(" ", string.Empty).ToUpper()}.xml"),
-// null, PathHelper.GetAbsolutePath(@"Images\Asus\Drams"));
-// }
-
-// ///
-// protected override void ApplyColorData() => _AsusSDK.SetDramColor(DramDeviceInfo.Handle, ColorData);
-
-// #endregion
-// }
-//}
diff --git a/RGB.NET.Devices.Asus_Legacy/Dram/AsusDramRGBDeviceInfo.cs b/RGB.NET.Devices.Asus_Legacy/Dram/AsusDramRGBDeviceInfo.cs
deleted file mode 100644
index 9f92cac..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Dram/AsusDramRGBDeviceInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using RGB.NET.Core;
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- ///
- /// Represents a generic information for a .
- ///
- public class AsusDramRGBDeviceInfo : AsusRGBDeviceInfo
- {
- #region Properties & Fields
-
- ///
- public override bool SupportsSyncBack => true;
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Internal constructor of managed .
- ///
- /// The type of the .
- /// The handle of the .
- internal AsusDramRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle)
- : base(deviceType, handle)
- { }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/Enum/AsusLogicalKeyboardLayout.cs b/RGB.NET.Devices.Asus_Legacy/Enum/AsusLogicalKeyboardLayout.cs
deleted file mode 100644
index 60105e5..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Enum/AsusLogicalKeyboardLayout.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// ReSharper disable InconsistentNaming
-// ReSharper disable UnusedMember.Global
-
-#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- /// Contains list of available logical layouts for asus keyboards.
- ///
- public enum AsusLogicalKeyboardLayout
- {
- TODO
- };
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/Enum/AsusPhysicalKeyboardLayout.cs b/RGB.NET.Devices.Asus_Legacy/Enum/AsusPhysicalKeyboardLayout.cs
deleted file mode 100644
index b5e80de..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Enum/AsusPhysicalKeyboardLayout.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// ReSharper disable UnusedMember.Global
-// ReSharper disable InconsistentNaming
-
-#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- /// Contains list of available physical layouts for asus keyboards.
- ///
- public enum AsusPhysicalKeyboardLayout
- {
- TODO
- }
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/Generic/AsusRGBDevice.cs b/RGB.NET.Devices.Asus_Legacy/Generic/AsusRGBDevice.cs
deleted file mode 100644
index 011383b..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Generic/AsusRGBDevice.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.InteropServices;
-using RGB.NET.Core;
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- ///
- ///
- /// Represents a generic Asus-device. (keyboard, mouse, headset, mousepad).
- ///
- public abstract class AsusRGBDevice : AbstractRGBDevice, IAsusRGBDevice
- where TDeviceInfo : AsusRGBDeviceInfo
- {
- #region Properties & Fields
-
- ///
- ///
- /// Gets information about the .
- ///
- public override TDeviceInfo DeviceInfo { get; }
-
- ///
- /// Gets or sets the update queue performing updates for this device.
- ///
- // ReSharper disable once MemberCanBePrivate.Global
- protected AsusUpdateQueue UpdateQueue { get; set; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The generic information provided by Asus for the device.
- protected AsusRGBDevice(TDeviceInfo info)
- {
- this.DeviceInfo = info;
- }
-
- #endregion
-
- #region Methods
-
- ///
- /// Initializes the device.
- ///
- public void Initialize(IDeviceUpdateTrigger updateTrigger)
- {
- InitializeLayout();
-
- if (Size == Size.Invalid)
- {
- Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle));
- Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
- }
-
- UpdateQueue = new AsusUpdateQueue(updateTrigger);
- UpdateQueue.Initialize(GetUpdateColorAction(), DeviceInfo.Handle, LedMapping.Count);
- }
-
- ///
- /// Initializes the and of the device.
- ///
- protected abstract void InitializeLayout();
-
- ///
- protected override void UpdateLeds(IEnumerable ledsToUpdate) => UpdateQueue.SetData(ledsToUpdate.Where(x => x.Color.A > 0));
-
- ///
- /// Gets a action to update the physical device.
- ///
- ///
- protected abstract Action GetUpdateColorAction();
-
- ///
- ///
- public override void Dispose()
- {
- try { UpdateQueue?.Dispose(); }
- catch { /* at least we tried */ }
-
- if ((DeviceInfo is AsusRGBDeviceInfo deviceInfo) && (deviceInfo.Handle != IntPtr.Zero))
- Marshal.FreeHGlobal(deviceInfo.Handle);
-
- base.Dispose();
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/Generic/AsusRGBDeviceInfo.cs b/RGB.NET.Devices.Asus_Legacy/Generic/AsusRGBDeviceInfo.cs
deleted file mode 100644
index 7c6ff69..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Generic/AsusRGBDeviceInfo.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System;
-using RGB.NET.Core;
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- ///
- /// Represents a generic information for a Corsair-.
- ///
- public abstract class AsusRGBDeviceInfo : IRGBDeviceInfo
- {
- #region Properties & Fields
-
- ///
- public RGBDeviceType DeviceType { get; }
-
- ///
- public string DeviceName { get; }
-
- ///
- public string Manufacturer { get; }
-
- ///
- public string Model { get; }
-
- ///
- public Uri Image { get; set; }
-
- ///
- public RGBDeviceLighting Lighting => RGBDeviceLighting.Key;
-
- ///
- public abstract bool SupportsSyncBack { get; }
-
- ///
- /// Gets the index of the .
- ///
- internal IntPtr Handle { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Internal constructor of managed .
- ///
- /// The type of the .
- /// The handle of the .
- /// The manufacturer-name of the .
- /// The model-name of the .
- internal AsusRGBDeviceInfo(RGBDeviceType deviceType, IntPtr handle, string model = "Generic Asus-Device", string manufacturer = "Asus")
- {
- this.DeviceType = deviceType;
- this.Handle = handle;
- this.Model = model;
- this.Manufacturer = manufacturer;
-
- DeviceName = $"{Manufacturer} {Model}";
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Devices.Asus_Legacy/Generic/AsusUpdateQueue.cs b/RGB.NET.Devices.Asus_Legacy/Generic/AsusUpdateQueue.cs
deleted file mode 100644
index 28fa936..0000000
--- a/RGB.NET.Devices.Asus_Legacy/Generic/AsusUpdateQueue.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System;
-using System.Collections.Generic;
-using RGB.NET.Core;
-
-namespace RGB.NET.Devices.Asus
-{
- ///
- ///
- /// Represents the update-queue performing updates for asus devices.
- ///
- public class AsusUpdateQueue : UpdateQueue
- {
- #region Properties & Fields
-
- ///
- /// Gets or sets the internal color-data cache.
- ///
- // ReSharper disable once MemberCanBePrivate.Global
- protected byte[] ColorData { get; private set; }
-
- private Action _updateAction;
- private IntPtr _handle;
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The update trigger used by this queue.
- public AsusUpdateQueue(IDeviceUpdateTrigger updateTrigger)
- : base(updateTrigger)
- { }
-
- #endregion
-
- #region Methods
-
- ///
- /// Initializes the queue.
- ///
- /// The update-action called by the queue to perform updates.
- /// The handle of the device this queue performs updates for.
- /// The amount of leds of the device this queue performs updates for.
- public void Initialize(Action updateAction, IntPtr handle, int ledCount)
- {
- _updateAction = updateAction;
- _handle = handle;
-
- ColorData = new byte[ledCount * 3];
- }
-
- ///
- protected override void Update(Dictionary