mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Save boot sounds status https://github.com/seerge/g-helper/issues/2555
This commit is contained in:
@@ -398,7 +398,10 @@ namespace GHelper
|
|||||||
checkGpuApps.Checked = AppConfig.Is("kill_gpu_apps");
|
checkGpuApps.Checked = AppConfig.Is("kill_gpu_apps");
|
||||||
checkGpuApps.CheckedChanged += CheckGpuApps_CheckedChanged;
|
checkGpuApps.CheckedChanged += CheckGpuApps_CheckedChanged;
|
||||||
|
|
||||||
checkBootSound.Checked = (Program.acpi.DeviceGet(AsusACPI.BootSound) == 1);
|
int bootSound = Program.acpi.DeviceGet(AsusACPI.BootSound);
|
||||||
|
if (bootSound < 0 || bootSound > UInt16.MaxValue) bootSound = AppConfig.Get("boot_sound", 0);
|
||||||
|
|
||||||
|
checkBootSound.Checked = (bootSound == 1);
|
||||||
checkBootSound.CheckedChanged += CheckBootSound_CheckedChanged;
|
checkBootSound.CheckedChanged += CheckBootSound_CheckedChanged;
|
||||||
|
|
||||||
var statusLed = Program.acpi.DeviceGet(AsusACPI.StatusLed);
|
var statusLed = Program.acpi.DeviceGet(AsusACPI.StatusLed);
|
||||||
@@ -536,7 +539,9 @@ namespace GHelper
|
|||||||
|
|
||||||
private void CheckBootSound_CheckedChanged(object? sender, EventArgs e)
|
private void CheckBootSound_CheckedChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.BootSound, (checkBootSound.Checked ? 1 : 0), "BootSound");
|
int bootSound = checkBootSound.Checked ? 1 : 0;
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.BootSound, bootSound, "BootSound");
|
||||||
|
AppConfig.Set("boot_sound", bootSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckGPUFix_CheckedChanged(object? sender, EventArgs e)
|
private void CheckGPUFix_CheckedChanged(object? sender, EventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user