mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 21:16:24 +00:00
Check RGBDeviceType.All in RGBSurface.GetDevices
Add a check for the RGBDeviceType.All in the RGBSurface.GetDevices function
This commit is contained in:
1 parent
18871b9a27
commit
11d3667021
1 file changed
+1
-1
@@ -250,7 +250,7 @@ namespace RGB.NET.Core
|
||||
/// <param name="deviceType">The <see cref="RGBDeviceType"/> of the devices to get.</param>
|
||||
/// <returns>a list of devices matching the specified <see cref="RGBDeviceType"/>.</returns>
|
||||
public IList<IRGBDevice> GetDevices(RGBDeviceType deviceType)
|
||||
=> new ReadOnlyCollection<IRGBDevice>(_devices.Where(x => x.DeviceInfo.DeviceType == deviceType).ToList());
|
||||
=> new ReadOnlyCollection<IRGBDevice>(deviceType == RGBDeviceType.All ? _devices : _devices.Where(x => x.DeviceInfo.DeviceType == deviceType).ToList());
|
||||
|
||||
/// <summary>
|
||||
/// Registers the provided <see cref="IUpdateTrigger"/>.
|
||||
|
||||
Reference in new issue
Block a user