mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed Video mode detection without forced parameter
Accidentally broke the auto detection when no forced video command line option given. Now works again.
This commit is contained in:
parent
eef92abebf
commit
964d982bd1
@ -277,6 +277,16 @@ namespace DisplayMagician {
|
|||||||
Console.WriteLine($"Forcing Windows CCD Video Library as '--force-video-library Windows' was provided on the commandline.");
|
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.");
|
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();
|
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.");
|
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.");
|
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();
|
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.");
|
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.");
|
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.
|
//description and help text of the command.
|
||||||
createProfileCmd.Description = "Use this command to go directly to the create display profile screen.";
|
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.");
|
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.");
|
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");
|
logger.Debug($"No commandline command was invoked, so starting up normally");
|
||||||
|
@ -152,21 +152,28 @@ namespace DisplayMagicianShared.Windows
|
|||||||
public override void RefreshPossbility()
|
public override void RefreshPossbility()
|
||||||
{
|
{
|
||||||
// Check whether this profile is possible
|
// 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!");
|
SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is possible!");
|
||||||
_isPossible = true;
|
_isPossible = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is NOT possible!");
|
||||||
|
_isPossible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SharedLogger.logger.Debug($"ProfileRepository/IsPossibleRefresh: The Windows CCD profile {Name} is NOT possible!");
|
|
||||||
_isPossible = false;
|
_isPossible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Actually set this profile active
|
// Actually set this profile active
|
||||||
public override bool SetActive()
|
public override bool SetActive()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user