Skip to content

Commit

Permalink
Visual Mode tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Sep 21, 2024
1 parent cd74c62 commit 59b5888
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/Display/VisualControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static class VisualControl

private static int _brightness = 100;
private static bool _init = true;
private static bool _download = true;
private static string? _splendidPath = null;

private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200);
Expand Down Expand Up @@ -217,6 +218,11 @@ public static void SetGamut(int mode = -1)
{
Logger.WriteLine("Gamut setting refused, reverting.");
RunSplendid(SplendidCommand.GamutMode, 0, (int)GetDefaultGamut());
if (ProcessHelper.IsUserAdministrator() && _download)
{
_download = false;
ColorProfileHelper.InstallProfile();
}
}
if (result == 1 && _init)
{
Expand Down Expand Up @@ -262,8 +268,13 @@ public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int
if (result == 0) return;
if (result == -1)
{
Logger.WriteLine("Visual setting refused, reverting.");
Logger.WriteLine("Visual mode setting refused, reverting.");
RunSplendid(SplendidCommand.Default, 0, DefaultColorTemp);
if (ProcessHelper.IsUserAdministrator() && _download)
{
_download = false;
ColorProfileHelper.InstallProfile();
}
}
if (result == 1 && _init)
{
Expand Down

0 comments on commit 59b5888

Please sign in to comment.