mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 01:58:30 +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:
parent
18871b9a27
commit
11d3667021
@ -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"/>.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user