From 11d36670215a8dd5ff39d79b3f037862d85bacff Mon Sep 17 00:00:00 2001 From: Sander Jochems Date: Sat, 1 Jun 2019 16:56:46 +0200 Subject: [PATCH] Check RGBDeviceType.All in RGBSurface.GetDevices Add a check for the RGBDeviceType.All in the RGBSurface.GetDevices function --- RGB.NET.Core/RGBSurface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index c0a4d1a..12a8e7b 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(_devices.Where(x => x.DeviceInfo.DeviceType == deviceType).ToList()); + => new ReadOnlyCollection(deviceType == RGBDeviceType.All ? _devices : _devices.Where(x => x.DeviceInfo.DeviceType == deviceType).ToList()); /// /// Registers the provided .