Visual Modes cleanup

This commit is contained in:
Serge
2024-05-15 23:14:33 +02:00
parent 8c5fc0f643
commit 2628695bbc
2 changed files with 8 additions and 4 deletions

View File

@@ -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;