Merge branch 'seerge:main' into asus-mouse-support

This commit is contained in:
IceStormNG
2023-10-04 13:44:05 +02:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -327,7 +327,7 @@ public static class AppConfig
// Devices with bugged bios command to change brightness
public static bool SwappedBrightness()
{
return ContainsModel("FA506IH") || ContainsModel("FX506LU");
return ContainsModel("FA506IH") || ContainsModel("FX506LU") || ContainsModel("FX506IC");
}

View File

@@ -39,6 +39,7 @@ namespace GHelper
static long lastRefresh;
static long lastBatteryRefresh;
static long lastLostFocus;
bool isGpuSection = true;
@@ -88,6 +89,7 @@ namespace GHelper
buttonUpdates.Text = Properties.Strings.Updates;
FormClosing += SettingsForm_FormClosing;
Deactivate += SettingsForm_LostFocus;
buttonSilent.BorderColor = colorEco;
buttonBalanced.BorderColor = colorStandard;
@@ -212,6 +214,11 @@ namespace GHelper
panelPerformance.Focus();
}
private void SettingsForm_LostFocus(object? sender, EventArgs e)
{
lastLostFocus = DateTimeOffset.Now.ToUnixTimeMilliseconds();
}
private void ButtonBatteryFull_Click(object? sender, EventArgs e)
{
BatteryControl.ToggleBatteryLimitFull();
@@ -881,7 +888,8 @@ namespace GHelper
(extraForm != null && extraForm.ContainsFocus) ||
(updatesForm != null && updatesForm.ContainsFocus) ||
(matrixForm != null && matrixForm.ContainsFocus) ||
this.ContainsFocus;
this.ContainsFocus ||
Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300;
}
private void SettingsForm_FormClosing(object? sender, FormClosingEventArgs e)