From 731a6c845f379b4b955ca39ea16cb6ab0011a7e2 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:11:57 +0100 Subject: [PATCH] Allow clicking on visual-modes label to enable them again --- app/Display/VisualControl.cs | 6 ++++-- app/Settings.Designer.cs | 1 + app/Settings.cs | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Display/VisualControl.cs b/app/Display/VisualControl.cs index 70c3cc90..d55abfcd 100644 --- a/app/Display/VisualControl.cs +++ b/app/Display/VisualControl.cs @@ -40,6 +40,8 @@ namespace GHelper.Display private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200); public const int DefaultColorTemp = 50; + + public static bool forceVisual = false; static VisualControl() { brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed; @@ -129,8 +131,8 @@ namespace GHelper.Display if (mode == SplendidCommand.None) return; if (mode == SplendidCommand.Default && init) return; // Skip default setting on init - if (ScreenCCD.GetHDRStatus(true)) return; - if (ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return; + if (!forceVisual && ScreenCCD.GetHDRStatus(true)) return; + if (!forceVisual && ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return; if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin(); diff --git a/app/Settings.Designer.cs b/app/Settings.Designer.cs index 1c9bd1d6..60e58873 100644 --- a/app/Settings.Designer.cs +++ b/app/Settings.Designer.cs @@ -1714,6 +1714,7 @@ namespace GHelper labelVisual.TabIndex = 42; labelVisual.Text = "Visual Modes are not available when HDR is active"; labelVisual.Visible = false; + labelVisual.Cursor = Cursors.Hand; // // tableVisual // diff --git a/app/Settings.cs b/app/Settings.cs index 97a2a8cb..61df5ddb 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -256,10 +256,17 @@ namespace GHelper VisualiseFnLock(); buttonFnLock.Click += ButtonFnLock_Click; + labelVisual.Click += LabelVisual_Click; + panelPerformance.Focus(); InitVisual(); } + private void LabelVisual_Click(object? sender, EventArgs e) + { + labelVisual.Visible = false; + VisualControl.forceVisual = true; + } public void InitVisual() {