1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00
This commit is contained in:
Aytaç Kayadelen 2023-12-06 22:19:43 +01:00
parent c11965eb3a
commit 1bd5b54892
2 changed files with 9 additions and 3 deletions

View File

@ -76,7 +76,7 @@ public sealed class AsusDeviceProvider : AbstractRGBDeviceProvider
yield return (AsusDeviceType)device.Type switch
{
AsusDeviceType.MB_RGB => new AsusMainboardRGBDevice(new AsusRGBDeviceInfo(RGBDeviceType.Mainboard, device, 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()),

View File

@ -1,4 +1,5 @@
using AuraServiceLib;
using System.Collections.Generic;
using AuraServiceLib;
using RGB.NET.Core;
namespace RGB.NET.Devices.Asus;
@ -10,6 +11,11 @@ public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDevi
{
#region Properties & Fields
/// <summary>
/// The ASUS SDK returns useless names for notebook keyboards, possibly for others as well.
/// </summary>
private static readonly List<string> GENERIC_DEVICE_NAMES = new() { "NotebookKeyboard" };
/// <inheritdoc />
public KeyboardLayoutType Layout => KeyboardLayoutType.Unknown;
@ -30,7 +36,7 @@ public sealed class AsusKeyboardRGBDeviceInfo : AsusRGBDeviceInfo, IKeyboardDevi
#region Methods
private static string? GetKeyboardModel(string deviceName) => deviceName;
private static string? GetKeyboardModel(string deviceName) => GENERIC_DEVICE_NAMES.Contains(deviceName) ? "Asus Motherboard" : deviceName;
#endregion
}