From 81a0019b425523a240440ce048ba6471dcbf4da1 Mon Sep 17 00:00:00 2001 From: seerge Date: Mon, 20 Feb 2023 17:24:24 +0100 Subject: [PATCH] Assure gpu mode and refresh rate are set at startup --- Program.cs | 4 ++++ Settings.cs | 3 --- null | Bin 78 -> 0 bytes 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 null diff --git a/Program.cs b/Program.cs index 04a3e64d..bb5667c6 100644 --- a/Program.cs +++ b/Program.cs @@ -534,6 +534,10 @@ namespace GHelper settingsForm.SetStartupCheck(scheduler.IsScheduled()); + bool isPlugged = (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online); + settingsForm.AutoGPUMode(isPlugged ? 1 : 0); + settingsForm.AutoScreen(isPlugged ? 1 : 0); + Application.Run(); } diff --git a/Settings.cs b/Settings.cs index ce4f9e74..dc9a2083 100644 --- a/Settings.cs +++ b/Settings.cs @@ -349,9 +349,6 @@ namespace GHelper } - Application.EnableVisualStyles(); - Application.Run(); - Program.config.setConfig("performance_mode", PerformanceMode); try { diff --git a/null b/null deleted file mode 100644 index 138dfbbe5475cd40a693108f835e7019e692fc34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78 zcmW-X!3n@100ZwWbQD2t6%;ci{ifkG~jyg-pH0(Onv{m&# MeK)sTE-VfLANk!2F8}}l