Skip to content

Commit

Permalink
Merge pull request #335 from Aytackydln/asus-remove-system-management
Browse files Browse the repository at this point in the history
Asus: Remove System.Management
  • Loading branch information
DarthAffe authored Oct 20, 2024
2 parents a0198e3 + 54c09a1 commit a26eaf9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 89 deletions.
2 changes: 1 addition & 1 deletion RGB.NET.Devices.Asus/AsusDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override IEnumerable<IRGBDevice> LoadDevices()

yield return (AsusDeviceType)device.Type switch
{
AsusDeviceType.MB_RGB => new AsusMainboardRGBDevice(new AsusRGBDeviceInfo(RGBDeviceType.Mainboard, device, WMIHelper.GetMainboardInfo()?.model ?? device.Name), GetUpdateTrigger()),
AsusDeviceType.MB_RGB => new AsusMainboardRGBDevice(new AsusRGBDeviceInfo(RGBDeviceType.Mainboard, device, "Asus Motherboard"), GetUpdateTrigger()),
AsusDeviceType.MB_ADDRESABLE => new AsusUnspecifiedRGBDevice(new AsusRGBDeviceInfo(RGBDeviceType.LedStripe, device), LedId.LedStripe1, GetUpdateTrigger()),
AsusDeviceType.VGA_RGB => new AsusGraphicsCardRGBDevice(new AsusRGBDeviceInfo(RGBDeviceType.GraphicsCard, device), GetUpdateTrigger()),
AsusDeviceType.HEADSET_RGB => new AsusHeadsetRGBDevice(new AsusRGBDeviceInfo(RGBDeviceType.Headset, device), GetUpdateTrigger()),
Expand Down
82 changes: 0 additions & 82 deletions RGB.NET.Devices.Asus/Helper/WMIHelper.cs

This file was deleted.

3 changes: 1 addition & 2 deletions RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDeviceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDevi

/// <summary>
/// The ASUS SDK returns useless names for notebook keyboards, possibly for others as well.
/// Keep a list of those and rely on <see cref="WMIHelper.GetSystemModelInfo()"/> to get the real model
/// </summary>
private static readonly List<string> GENERIC_DEVICE_NAMES = ["NotebookKeyboard"];

Expand All @@ -37,7 +36,7 @@ internal AsusKeyboardRGBDeviceInfo(IAuraSyncDevice device)

#region Methods

private static string? GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? WMIHelper.GetSystemModelInfo() : deviceName;
private static string? GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? "Asus Keyboard" : deviceName;

#endregion
}
4 changes: 0 additions & 4 deletions RGB.NET.Devices.Asus/RGB.NET.Devices.Asus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Management" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\RGB.NET.Core\RGB.NET.Core.csproj" />
</ItemGroup>
Expand Down

0 comments on commit a26eaf9

Please sign in to comment.