mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Inlined variables
This commit is contained in:
parent
19d81d79c3
commit
a7dcf3d867
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user