mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 13:06:24 +00:00
Added a device filter to LoadDevices and device Initialize
This commit is contained in:
1 parent
b700c84b8d
commit
11ca959328
9 files changed
+142
-114
No files matched your search
@@ -82,7 +82,7 @@ namespace RGB.NET.Devices.CoolerMaster
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Initialize(bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
|
||||
public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
|
||||
{
|
||||
IsInitialized = false;
|
||||
|
||||
@@ -101,8 +101,11 @@ namespace RGB.NET.Devices.CoolerMaster
|
||||
_CoolerMasterSDK.SetControlDevice(index);
|
||||
if (_CoolerMasterSDK.IsDevicePlugged())
|
||||
{
|
||||
RGBDeviceType deviceType = index.GetDeviceType();
|
||||
if (!loadFilter.HasFlag(deviceType)) continue;
|
||||
|
||||
ICoolerMasterRGBDevice device;
|
||||
switch (index.GetDeviceType())
|
||||
switch (deviceType)
|
||||
{
|
||||
case RGBDeviceType.Keyboard:
|
||||
CoolerMasterPhysicalKeyboardLayout physicalLayout = _CoolerMasterSDK.GetDeviceLayout();
|
||||
|
||||
Reference in new issue
Block a user