mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Ally TDP (#2503)
* Init * TDP fixes * TDP tweaks * AutoTDP toggle * AutoTDP tweaks * AutoTDP tweaks * TDP tweaks * Cleanup * Power based AutoTDP * TDP tweaks
This commit is contained in:
@@ -222,7 +222,9 @@ namespace GHelper
|
||||
|
||||
buttonUpdates.Click += ButtonUpdates_Click;
|
||||
|
||||
sliderBattery.ValueChanged += SliderBattery_ValueChanged;
|
||||
sliderBattery.MouseUp += SliderBattery_MouseUp;
|
||||
sliderBattery.KeyUp += SliderBattery_KeyUp;
|
||||
|
||||
Program.trayIcon.MouseMove += TrayIcon_MouseMove;
|
||||
|
||||
sensorTimer = new System.Timers.Timer(AppConfig.Get("sensor_timer", 1000));
|
||||
@@ -249,6 +251,9 @@ namespace GHelper
|
||||
|
||||
buttonFPS.Click += ButtonFPS_Click;
|
||||
buttonOverlay.Click += ButtonOverlay_Click;
|
||||
|
||||
buttonAutoTDP.Click += ButtonAutoTDP_Click;
|
||||
buttonAutoTDP.BorderColor = colorTurbo;
|
||||
|
||||
Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort();
|
||||
TopMost = AppConfig.Is("topmost");
|
||||
@@ -272,6 +277,21 @@ namespace GHelper
|
||||
screenControl.ToogleFHD();
|
||||
}
|
||||
|
||||
private void SliderBattery_KeyUp(object? sender, KeyEventArgs e)
|
||||
{
|
||||
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
|
||||
}
|
||||
|
||||
private void SliderBattery_MouseUp(object? sender, MouseEventArgs e)
|
||||
{
|
||||
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
|
||||
}
|
||||
|
||||
private void ButtonAutoTDP_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleAutoTDP();
|
||||
}
|
||||
|
||||
private void LabelCharge_Click(object? sender, EventArgs e)
|
||||
{
|
||||
BatteryControl.BatteryReport();
|
||||
@@ -496,6 +516,12 @@ namespace GHelper
|
||||
buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit <= 120) ? limit : "OFF");
|
||||
}
|
||||
|
||||
public void VisualiseAutoTDP(bool status)
|
||||
{
|
||||
Logger.WriteLine($"Auto TDP: {status}");
|
||||
buttonAutoTDP.Activated = status;
|
||||
}
|
||||
|
||||
private void SettingsForm_LostFocus(object? sender, EventArgs e)
|
||||
{
|
||||
lastLostFocus = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
@@ -736,11 +762,6 @@ namespace GHelper
|
||||
gpuControl.ToggleXGM();
|
||||
}
|
||||
|
||||
private void SliderBattery_ValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
|
||||
}
|
||||
|
||||
|
||||
public void SetVersionLabel(string label, bool update = false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user