diff --git a/DisplayMagician/Program.cs b/DisplayMagician/Program.cs index 16d8382..d402452 100644 --- a/DisplayMagician/Program.cs +++ b/DisplayMagician/Program.cs @@ -277,6 +277,16 @@ namespace DisplayMagician { Console.WriteLine($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); logger.Info($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); + } + } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); } var argumentShortcut = runShortcutCmd.Argument("\"SHORTCUT_UUID\"", "(required) The UUID of the shortcut to run from those stored in the shortcut library.").IsRequired(); @@ -335,6 +345,16 @@ namespace DisplayMagician { Console.WriteLine($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); logger.Info($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); + } + } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); } var argumentProfile = runProfileCmd.Argument("\"Profile_UUID\"", "(required) The UUID of the profile to run from those stored in the profile file.").IsRequired(); @@ -400,8 +420,17 @@ namespace DisplayMagician { Console.WriteLine($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); logger.Info($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); + } + } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); } - //description and help text of the command. createProfileCmd.Description = "Use this command to go directly to the create display profile screen."; @@ -453,6 +482,16 @@ namespace DisplayMagician { Console.WriteLine($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); logger.Info($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline."); } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); + } + } + else + { + ProfileRepository.ForcedVideoMode = FORCED_VIDEO_MODE.DETECT; + logger.Info($"Leaving DisplayMagician to detect the best Video Library to use."); } logger.Debug($"No commandline command was invoked, so starting up normally"); diff --git a/DisplayMagicianShared/Windows/WinProfileItem.cs b/DisplayMagicianShared/Windows/WinProfileItem.cs index fdb3bc9..5e2e400 100644 --- a/DisplayMagicianShared/Windows/WinProfileItem.cs +++ b/DisplayMagicianShared/Windows/WinProfileItem.cs @@ -152,21 +152,28 @@ namespace DisplayMagicianShared.Windows public override void RefreshPossbility() { // Check whether this profile is possible - if (WinLibrary.GetLibrary().IsPossibleConfig(_windowsDisplayConfig)) + if (ProfileRepository.CurrentVideoMode == VIDEO_MODE.WINDOWS && WinLibrary.GetLibrary().IsInstalled) { + if (WinLibrary.GetLibrary().IsPossibleConfig(_windowsDisplayConfig)) + { - SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is possible!"); - _isPossible = true; + SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is possible!"); + _isPossible = true; + } + else + { + SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is NOT possible!"); + _isPossible = false; + } } else { - SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is NOT possible!"); _isPossible = false; } - } + // Actually set this profile active public override bool SetActive() {