Compare commits

...

2 commits

Author SHA1 Message Date
Ell e45344d211 1.2.4 2022-05-18 14:01:33 +02:00
Ell c3e7d56248 ensure that lighting systems are properly disposed 2022-05-18 13:59:19 +02:00
5 changed files with 11 additions and 7 deletions

View file

@ -11,7 +11,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>Logo.png</PackageIcon>
<VersionPrefix>1.2.3</VersionPrefix>
<VersionPrefix>1.2.4</VersionPrefix>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>

View file

@ -26,10 +26,6 @@ namespace Illumilib.System {
}
}
public override void Dispose() {
// no op
}
public override void SetAllLighting(float r, float g, float b) {
foreach (var device in this.devices) {
device.SetAllColors(r, g, b);

View file

@ -5,9 +5,11 @@ namespace Illumilib.System {
public abstract LightingType Type { get; }
public abstract bool Initialize();
~LightingSystem() {
this.Dispose();
}
public abstract void Dispose();
public abstract bool Initialize();
public abstract void SetAllLighting(float r, float g, float b);
@ -21,5 +23,9 @@ namespace Illumilib.System {
public abstract void SetMouseLighting(float r, float g, float b);
public virtual void Dispose() {
GC.SuppressFinalize(this);
}
}
}

View file

@ -18,6 +18,7 @@ namespace Illumilib.System {
}
public override void Dispose() {
base.Dispose();
this.ClearBitmap();
LogitechGsdk.LogiLedShutdown();
}

View file

@ -21,6 +21,7 @@ namespace Illumilib.System {
}
public override void Dispose() {
base.Dispose();
this.chroma.UninitializeAsync();
this.effectOutdated = true;
}