mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Update logitech integration to make use of the new zone-system in the latest logitech SDK
This commit is contained in:
1 parent
c056aa7444
commit
0412058e6a
9 files changed
+246
-31
No files matched your search
@@ -18,7 +18,7 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// Gets information about the <see cref="T:RGB.NET.Devices.Logitech.LogitechRGBDevice" />.
|
||||
/// </summary>
|
||||
public override TDeviceInfo DeviceInfo { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the update queue performing updates for this device.
|
||||
/// </summary>
|
||||
@@ -64,6 +64,7 @@ namespace RGB.NET.Devices.Logitech
|
||||
protected virtual void InitializeLayout()
|
||||
{
|
||||
if (!(DeviceInfo is LogitechRGBDeviceInfo info)) return;
|
||||
|
||||
string layout = info.ImageLayout;
|
||||
string layoutPath = info.LayoutPath;
|
||||
ApplyLayoutFromFile(PathHelper.GetAbsolutePath($@"Layouts\Logitech\{layoutPath}.xml"), layout, true);
|
||||
|
||||
@@ -49,6 +49,11 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// </summary>
|
||||
public LogitechDeviceCaps DeviceCaps { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the amount of zones the <see cref="LogitechRGBDevice{TDeviceInfo}"/> is able to control (0 for single-color and per-key devices)
|
||||
/// </summary>
|
||||
public int Zones { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the layout used to decide which images to load.
|
||||
/// </summary>
|
||||
@@ -69,14 +74,16 @@ namespace RGB.NET.Devices.Logitech
|
||||
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
|
||||
/// <param name="model">The represented device model.</param>
|
||||
/// <param name="deviceCaps">The lighting-capabilities of the device.</param>
|
||||
/// <param name="zones">The amount of zones the device is able to control.</param>
|
||||
/// <param name="imageLayout">The layout used to decide which images to load.</param>
|
||||
/// <param name="layoutPath">The path/name of the layout-file.</param>
|
||||
internal LogitechRGBDeviceInfo(RGBDeviceType deviceType, string model, LogitechDeviceCaps deviceCaps,
|
||||
string imageLayout, string layoutPath)
|
||||
int zones, string imageLayout, string layoutPath)
|
||||
{
|
||||
this.DeviceType = deviceType;
|
||||
this.Model = model;
|
||||
this.DeviceCaps = deviceCaps;
|
||||
this.Zones = zones;
|
||||
this.ImageLayout = imageLayout;
|
||||
this.LayoutPath = layoutPath;
|
||||
|
||||
|
||||
Reference in new issue
Block a user