diff --git a/app/Extra.Designer.cs b/app/Extra.Designer.cs index fe8d9e22..e90320d9 100644 --- a/app/Extra.Designer.cs +++ b/app/Extra.Designer.cs @@ -1033,7 +1033,6 @@ namespace GHelper checkAutoToggleClamshellMode.TabIndex = 58; checkAutoToggleClamshellMode.Text = "Auto Toggle Clamshell Mode"; checkAutoToggleClamshellMode.UseVisualStyleBackColor = true; - checkAutoToggleClamshellMode.CheckedChanged += checkAutoToggleClamshellMode_CheckedChanged; // // checkAutoApplyWindowsPowerMode // diff --git a/app/Extra.cs b/app/Extra.cs index 499423eb..82a59ef4 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -229,6 +229,7 @@ namespace GHelper checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected(); checkAutoToggleClamshellMode.Checked = AppConfig.Is("toggle_clamshell_mode"); + checkAutoToggleClamshellMode.CheckedChanged += checkAutoToggleClamshellMode_CheckedChanged; checkTopmost.Checked = AppConfig.Is("topmost"); checkTopmost.CheckedChanged += CheckTopmost_CheckedChanged; ; @@ -487,10 +488,20 @@ namespace GHelper AppConfig.Set("auto_apply_power_plan", checkAutoApplyWindowsPowerMode.Checked ? 1 : 0); } - private void checkAutoToggleClamshellMode_CheckedChanged(object sender, EventArgs e) + private void checkAutoToggleClamshellMode_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("toggle_clamshell_mode", checkAutoToggleClamshellMode.Checked ? 1 : 0); - clamshellControl.ToggleLidAction(); + + if (checkAutoToggleClamshellMode.Checked) + { + ClamshellModeControl ctrl = new ClamshellModeControl(); + ctrl.ToggleLidAction(); + } + else + { + ClamshellModeControl.DisableClamshellMode(); + } + } } } diff --git a/app/Helpers/ClamshellModeControl.cs b/app/Helpers/ClamshellModeControl.cs index b01e86bb..d4fb59fc 100644 --- a/app/Helpers/ClamshellModeControl.cs +++ b/app/Helpers/ClamshellModeControl.cs @@ -39,24 +39,38 @@ namespace GHelper.Helpers return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online; } - public bool IsInClamshellMode() + public bool IsClamshellReady() { return IsExternalDisplayConnected() && IsChargerConnected(); } public void ToggleLidAction() { - if (IsInClamshellMode() && IsClamshellEnabled()) + if (!IsClamshellEnabled()) { - PowerNative.SetLidAction(0, true); - Logger.WriteLine("Engaging Clamshell Mode"); + return; + } + + if (IsClamshellReady()) + { + EnableClamshellMode(); } else { - PowerNative.SetLidAction(1, true); - Logger.WriteLine("Disengaging Clamshell Mode"); + DisableClamshellMode(); } } + public static void DisableClamshellMode() + { + PowerNative.SetLidAction(1, true); + Logger.WriteLine("Disengaging Clamshell Mode"); + } + + public static void EnableClamshellMode() + { + PowerNative.SetLidAction(0, true); + Logger.WriteLine("Engaging Clamshell Mode"); + } public void UnregisterDisplayEvents() { diff --git a/app/Properties/Strings.es.resx b/app/Properties/Strings.es.resx index 31da09d5..429bbb62 100644 --- a/app/Properties/Strings.es.resx +++ b/app/Properties/Strings.es.resx @@ -402,7 +402,7 @@ Nuevas actualizaciones - No hay nuevas actualizaciones + No hay actualizaciones Abrir ventana G-Helper diff --git a/app/Properties/Strings.it.resx b/app/Properties/Strings.it.resx index 59e67f07..13d8e149 100644 --- a/app/Properties/Strings.it.resx +++ b/app/Properties/Strings.it.resx @@ -208,7 +208,7 @@ Limite Ricarica Batteria - Battery Health + Salute Batteria Aggiornamenti Driver e BIOS @@ -232,7 +232,7 @@ Colore - CPU Boost + Boost CPU Personalizzato diff --git a/app/Properties/Strings.pl.resx b/app/Properties/Strings.pl.resx index 7016f67a..3e4618fc 100644 --- a/app/Properties/Strings.pl.resx +++ b/app/Properties/Strings.pl.resx @@ -208,7 +208,7 @@ Limit ładowania baterii - Battery Health + Stan baterii Aktualizacje BIOS i sterowników @@ -294,7 +294,7 @@ Nadal chcesz kontynuować? Wentylatory i moc - Wentylator + Went Dostosuj diff --git a/app/Properties/Strings.uk.resx b/app/Properties/Strings.uk.resx index 2fd0e1d0..44fea220 100644 --- a/app/Properties/Strings.uk.resx +++ b/app/Properties/Strings.uk.resx @@ -208,7 +208,7 @@ Ліміт заряду батареї - Battery Health + Стан батареї Оновлення BIOS та драйверів diff --git a/app/Properties/Strings.zh-CN.resx b/app/Properties/Strings.zh-CN.resx index eb3e367a..8ba17090 100644 --- a/app/Properties/Strings.zh-CN.resx +++ b/app/Properties/Strings.zh-CN.resx @@ -208,7 +208,7 @@ 电池充电限制 - Battery Health + 电池健康 BIOS 和驱动程序更新 @@ -495,7 +495,7 @@ 切换 Aura 模式 - Auto Toggle Clamshell Mode + 自动启用外接显示器模式 切换 Fn 锁定 diff --git a/app/Properties/Strings.zh-TW.resx b/app/Properties/Strings.zh-TW.resx index e312213b..624ddc43 100644 --- a/app/Properties/Strings.zh-TW.resx +++ b/app/Properties/Strings.zh-TW.resx @@ -208,7 +208,7 @@ 電池充電上限 - Battery Health + 電池健康度 BIOS與驅動程式更新 Updates diff --git a/docs/README.md b/docs/README.md index 2d835492..b30dff1e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -125,7 +125,11 @@ You can find them under ``%AppData%\GHelper`` folder. Please include them when p Open app, and uncheck and check again "run on startup". If it still doesn't help (by some reason), you can try to manually edit "GHelper" task in windows Task Scheduler, and add couple of seconds delay to start. #### How do I uninstall G-helper? -G-helper is a single exe, and it doesn't install anything in the system. To remove it - you can simply delete exe :) If you have applied any custom fan profiles or PPTs - before removing I would recommend selecting your favorite performance mode (for example balanced) and clicking "Factory defaults" under Fans + Power. +G-helper is a single exe, and it doesn't install anything in the system. To remove it - you can simply delete exe :) If you have applied any custom fan profiles or PPTs - before removing I would recommend selecting your +favorite performance mode (for example balanced) and clicking "Factory defaults" under Fans + Power. + +#### Can I undervolt my CPU ? +Currently you can undervolt AMD CPUs. If your model supports that - you will see undervolting slider under ``Fans+Power -> Advanced``. If you don't see slider there, it means your CPU doesn't support undervolting. Full list of models that suppor that [can be found here](https://github.com/seerge/g-helper/discussions/736) #### I have G14 2023 and my GPU refuses to disable/enable It seem to be an issue in older BIOS versions. As [users report](https://github.com/seerge/g-helper/issues/680) - latest BIOS 310 (installable via myasus / g-helper -> updates) resolves all issues :) So please update.