Skip to content

Commit

Permalink
Fetch ZeroRPM state during/after reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rem0o committed Jun 26, 2024
1 parent 91a7ca9 commit 2794291
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ADLXControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ public ADLXControl(GPU gpu, ManualFanTuning fanTuning)
public string Name { get; }
public float? Value { get; private set; } = null;

private void SetZeroRPM(bool enabled)
private void SetZeroRPM(bool enable)
{
if (!_fanTuning.SupportsZeroRPM)
return;

if (enabled == _zeroRPMState)
if (enable == _zeroRPMState)
return;

_fanTuning.SetZeroRPM(enabled);
_zeroRPMState = enabled;
_fanTuning.SetZeroRPM(enable);
_zeroRPMState = enable;
}

public void Reset()
{
_fanTuning.Reset();
if (_fanTuning.SupportsZeroRPM)
_zeroRPMState = _fanTuning.GetZeroRPMState();

Value = null;
}

Expand Down

0 comments on commit 2794291

Please sign in to comment.