FPS Limit for Ally

This commit is contained in:
Serge
2024-01-13 21:37:47 +01:00
parent a29cd7e1be
commit e125afde1a
5 changed files with 136 additions and 30 deletions

View File

@@ -232,6 +232,7 @@ namespace GHelper
buttonController.Click += ButtonController_Click;
buttonBacklight.Click += ButtonBacklight_Click;
buttonFPS.Click += ButtonFPS_Click;
Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort();
TopMost = AppConfig.Is("topmost");
@@ -246,6 +247,11 @@ namespace GHelper
panelPerformance.Focus();
}
private void ButtonFPS_Click(object? sender, EventArgs e)
{
allyControl.ToggleFPSLimit();
}
private void ButtonBacklight_Click(object? sender, EventArgs e)
{
allyControl.ToggleBacklight();
@@ -286,6 +292,11 @@ namespace GHelper
buttonBacklight.Text = Math.Round((double)backlight*33.33).ToString() + "%";
}
public void VisualiseFPSLimit(int limit)
{
buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit < 120) ? limit : "OFF");
}
private void SettingsForm_LostFocus(object? sender, EventArgs e)
{
lastLostFocus = DateTimeOffset.Now.ToUnixTimeMilliseconds();