diff --git a/RGB.NET.Core/Devices/RGBDeviceType.cs b/RGB.NET.Core/Devices/RGBDeviceType.cs index 152c43c..b0de5e3 100644 --- a/RGB.NET.Core/Devices/RGBDeviceType.cs +++ b/RGB.NET.Core/Devices/RGBDeviceType.cs @@ -13,11 +13,6 @@ namespace RGB.NET.Core /// None = 0, - /// - /// Represents a device where the type is not known or not present in the list. - /// - Unknown = -1, - /// /// Represents a keyboard. /// @@ -88,6 +83,11 @@ namespace RGB.NET.Core /// Cooler = 1 << 13, + /// + /// Represents a device where the type is not known or not present in the list. + /// + Unknown = 1 << 31, + /// /// Represents all devices. /// diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index 12a8e7b..d2933c7 100644 --- a/RGB.NET.Core/RGBSurface.cs +++ b/RGB.NET.Core/RGBSurface.cs @@ -250,7 +250,7 @@ namespace RGB.NET.Core /// The of the devices to get. /// a list of devices matching the specified . public IList GetDevices(RGBDeviceType deviceType) - => new ReadOnlyCollection(deviceType == RGBDeviceType.All ? _devices : _devices.Where(x => x.DeviceInfo.DeviceType == deviceType).ToList()); + => new ReadOnlyCollection(_devices.Where(d => deviceType.HasFlag(d.DeviceInfo.DeviceType)).ToList()); /// /// Registers the provided .