diff --git a/app/Display/VisualControl.cs b/app/Display/VisualControl.cs index 93947297..e33d0462 100644 --- a/app/Display/VisualControl.cs +++ b/app/Display/VisualControl.cs @@ -167,8 +167,12 @@ namespace GHelper.Display }; } - public static void SetGamut(int mode = 50) + public static void SetGamut(int mode = -1) { + if (mode < 0) mode = (int)GetDefaultGamut(); + + AppConfig.Set("gamut", mode); + if (RunSplendid(SplendidCommand.GamutMode, 0, mode)) return; if (_init) @@ -187,6 +191,9 @@ namespace GHelper.Display if (!forceVisual && ScreenCCD.GetHDRStatus(true)) return; if (!forceVisual && ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return; + AppConfig.Set("visual", (int)mode); + AppConfig.Set("color_temp", whiteBalance); + if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin(); int? balance; diff --git a/app/Settings.cs b/app/Settings.cs index a0f0f139..4aec064b 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -409,14 +409,11 @@ namespace GHelper private void ComboGamut_SelectedValueChanged(object? sender, EventArgs e) { - AppConfig.Set("gamut", (int)comboGamut.SelectedValue); VisualControl.SetGamut((int)comboGamut.SelectedValue); } private void ComboVisual_SelectedValueChanged(object? sender, EventArgs e) { - AppConfig.Set("visual", (int)comboVisual.SelectedValue); - AppConfig.Set("color_temp", (int)comboColorTemp.SelectedValue); VisualControl.SetVisual((SplendidCommand)comboVisual.SelectedValue, (int)comboColorTemp.SelectedValue); }