From 433022b65d8e4e08fbf6dea35e274e032b96a047 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:42:23 +0200 Subject: [PATCH] Removed unsupported RGB flags for G614J https://github.com/seerge/g-helper/issues/1428 --- app/AppConfig.cs | 9 +++++---- app/Extra.cs | 29 +++++++++++++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 515afd80..95163719 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -9,6 +9,7 @@ public static class AppConfig private static string configFile; private static string? _model; + private static string? _modelShort; private static string? _bios; private static Dictionary config = new Dictionary(); @@ -73,7 +74,7 @@ public static class AppConfig public static (string, string) GetBiosAndModel() { - if (_bios is not null && _model is not null) return (_bios, _model); + if (_bios is not null && _modelShort is not null) return (_bios, _modelShort); using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher(@"SELECT * FROM Win32_BIOS")) { @@ -85,16 +86,16 @@ public static class AppConfig string[] results = obj["SMBIOSBIOSVersion"].ToString().Split("."); if (results.Length > 1) { - _model = results[0]; + _modelShort = results[0]; _bios = results[1]; } else { - _model = obj["SMBIOSBIOSVersion"].ToString(); + _modelShort = obj["SMBIOSBIOSVersion"].ToString(); } } - return (_bios, _model); + return (_bios, _modelShort); } } } diff --git a/app/Extra.cs b/app/Extra.cs index 8cfba44f..a1fc6933 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -276,22 +276,23 @@ namespace GHelper checkSleepBar.Visible = false; checkShutdownBar.Visible = false; - if (!AppConfig.IsZ13()) - { - labelBacklightLid.Visible = false; - checkAwakeLid.Visible = false; - checkBootLid.Visible = false; - checkSleepLid.Visible = false; - checkShutdownLid.Visible = false; + } - labelBacklightLogo.Visible = false; - checkAwakeLogo.Visible = false; - checkBootLogo.Visible = false; - checkSleepLogo.Visible = false; - checkShutdownLogo.Visible = false; + if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB()) + { + labelBacklightLid.Visible = false; + checkAwakeLid.Visible = false; + checkBootLid.Visible = false; + checkSleepLid.Visible = false; + checkShutdownLid.Visible = false; - labelBacklightKeyboard.Visible = false; - } + labelBacklightLogo.Visible = false; + checkAwakeLogo.Visible = false; + checkBootLogo.Visible = false; + checkSleepLogo.Visible = false; + checkShutdownLogo.Visible = false; + + labelBacklightKeyboard.Visible = false; } //checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected();