mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-04 22:07:40 +00:00
Expose OSD and Fan settings in PowerControl
This commit is contained in:
parent
44f25db836
commit
5f940c0ee4
5 changed files with 285 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using CommonHelpers;
|
||||
using CommonHelpers;
|
||||
using CommonHelpers.FromLibreHardwareMonitor;
|
||||
using FanControl.Properties;
|
||||
using System;
|
||||
|
|
@ -24,6 +24,8 @@ namespace FanControl
|
|||
"Starts Steam Deck Fan Control on Windows startup."
|
||||
);
|
||||
|
||||
private SharedData<FanModeSetting> sharedData = SharedData<FanModeSetting>.CreateNew();
|
||||
|
||||
public FanControlForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
|
@ -122,8 +124,19 @@ namespace FanControl
|
|||
fanControl.SetMode(FanMode.Default);
|
||||
}
|
||||
|
||||
private void SharedData_Update()
|
||||
{
|
||||
if (sharedData.GetValue(out var value) && Enum.IsDefined<FanMode>(value.Desired))
|
||||
{
|
||||
setFanMode((FanMode)value.Desired);
|
||||
}
|
||||
|
||||
sharedData.SetValue(new FanModeSetting() { Current = fanControl.Mode });
|
||||
}
|
||||
|
||||
private void fanLoopTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
SharedData_Update();
|
||||
fanControl.Update();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue