diff --git a/AMDInfo/CCD.cs b/AMDInfo/CCD.cs index a311708..d711da2 100644 --- a/AMDInfo/CCD.cs +++ b/AMDInfo/CCD.cs @@ -637,22 +637,33 @@ public bool Equals(DISPLAYCONFIG_MODE_INFO other) if (InfoType != other.InfoType) return false; + // This happens when it is a target mode info block if (InfoType == DISPLAYCONFIG_MODE_INFO_TYPE.DISPLAYCONFIG_MODE_INFO_TYPE_TARGET && Id == other.Id && TargetMode.Equals(other.TargetMode)) return true; + // This happens when it is a source mode info block if (InfoType == DISPLAYCONFIG_MODE_INFO_TYPE.DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE && //Id == other.Id && // Disabling this check as as the Display ID it maps to will change after a switch from surround to non-surround profile, ruining the equality match // Only seems to be a problem with the DISPLAYCONFIG_MODE_INFO_TYPE.DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE options weirdly enough! SourceMode.Equals(other.SourceMode)) return true; + // This happens when it is a desktop image mode info block if (InfoType == DISPLAYCONFIG_MODE_INFO_TYPE.DISPLAYCONFIG_MODE_INFO_TYPE_DESKTOP_IMAGE && Id == other.Id && DesktopImageInfo.Equals(other.DesktopImageInfo)) return true; + // This happens when it is a clone - there is an extra entry with all zeros in it! + if (InfoType == DISPLAYCONFIG_MODE_INFO_TYPE.Zero && + Id == other.Id && + DesktopImageInfo.Equals(other.DesktopImageInfo) && + TargetMode.Equals(other.TargetMode) && + SourceMode.Equals(other.SourceMode)) + return true; + return false; } diff --git a/AMDInfo/Program.cs b/AMDInfo/Program.cs index 89472bc..b97225a 100644 --- a/AMDInfo/Program.cs +++ b/AMDInfo/Program.cs @@ -52,10 +52,10 @@ static void Main(string[] args) NLog.LogManager.Configuration = config; // Start the Log file - SharedLogger.logger.Info($"AMDInfo/Main: Starting AMDInfo v1.1.0"); + SharedLogger.logger.Info($"AMDInfo/Main: Starting AMDInfo v1.1.1"); - Console.WriteLine($"\nAMDInfo v1.1.0"); + Console.WriteLine($"\nAMDInfo v1.1.1"); Console.WriteLine($"=============="); Console.WriteLine($"By Terry MacDonald 2021\n"); diff --git a/AMDInfo/Properties/AssemblyInfo.cs b/AMDInfo/Properties/AssemblyInfo.cs index 0357dd3..9e06653 100644 --- a/AMDInfo/Properties/AssemblyInfo.cs +++ b/AMDInfo/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.3.0")] -[assembly: AssemblyFileVersion("1.0.3.0")] +[assembly: AssemblyVersion("1.1.1.0")] +[assembly: AssemblyFileVersion("1.1.1.0")]