mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 13:06:24 +00:00
Inlined variables
This commit is contained in:
1 parent
19d81d79c3
commit
a7dcf3d867
1 file changed
+2
-5
@@ -27,12 +27,9 @@ namespace RGB.NET.Devices.CoolerMaster
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void InitializeLayout()
|
protected override void InitializeLayout()
|
||||||
{
|
{
|
||||||
Dictionary<CoolerMasterPhysicalKeyboardLayout, Dictionary<LedId, (int row, int column)>> deviceMappings;
|
if (!CoolerMasterKeyboardLedMappings.Mapping.TryGetValue(DeviceInfo.DeviceIndex, out Dictionary<CoolerMasterPhysicalKeyboardLayout, Dictionary<LedId, (int row, int column)>> deviceMappings))
|
||||||
Dictionary<LedId, (int row, int column)> mapping;
|
|
||||||
|
|
||||||
if (!CoolerMasterKeyboardLedMappings.Mapping.TryGetValue(DeviceInfo.DeviceIndex, out deviceMappings))
|
|
||||||
throw new RGBDeviceException($"Failed to find a CoolerMasterKeyboardLedMapping for device index {DeviceInfo.DeviceIndex}");
|
throw new RGBDeviceException($"Failed to find a CoolerMasterKeyboardLedMapping for device index {DeviceInfo.DeviceIndex}");
|
||||||
if (!deviceMappings.TryGetValue(DeviceInfo.PhysicalLayout, out mapping))
|
if (!deviceMappings.TryGetValue(DeviceInfo.PhysicalLayout, out Dictionary<LedId, (int row, int column)> mapping))
|
||||||
throw new RGBDeviceException($"Failed to find a CoolerMasterKeyboardLedMapping for device index {DeviceInfo.DeviceIndex} with physical layout {DeviceInfo.PhysicalLayout}");
|
throw new RGBDeviceException($"Failed to find a CoolerMasterKeyboardLedMapping for device index {DeviceInfo.DeviceIndex} with physical layout {DeviceInfo.PhysicalLayout}");
|
||||||
|
|
||||||
foreach (KeyValuePair<LedId, (int row, int column)> led in mapping)
|
foreach (KeyValuePair<LedId, (int row, int column)> led in mapping)
|
||||||
|
|||||||
Reference in new issue
Block a user