From 40dd1473882d69526c0a366ee8edba944efed583 Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Sun, 4 Apr 2021 18:59:38 +1200 Subject: [PATCH] Fixed Display Driver change impacts NVIDIA just updated their device driver, and as part of those changes, it changed the name that was reported by the NVIDIA driver. This impacts our profile matching, as we previously used the name that it returned in the fingerprint we store about connected displays. This change removes that name so that it will correctly match on the old driver or the new driver. NOTE: This requires recreating the profiles though! --- DisplayMagicianShared/ProfileItem.cs | 7 ++++++- DisplayMagicianShared/ProfileRepository.cs | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/DisplayMagicianShared/ProfileItem.cs b/DisplayMagicianShared/ProfileItem.cs index 08a0aeb..bea2f81 100644 --- a/DisplayMagicianShared/ProfileItem.cs +++ b/DisplayMagicianShared/ProfileItem.cs @@ -507,10 +507,15 @@ namespace DisplayMagicianShared { // Check each display in this profile and make sure it's currently available int validDisplayCount = 0; + + //validDisplayCount = (from connectedDisplay in ProfileRepository.ConnectedDisplayIdentifiers select connectedDisplay == profileDisplayIdentifier).Count(); + foreach (string profileDisplayIdentifier in ProfileDisplayIdentifiers) { // If this profile has a display that isn't currently available then we need to say it's a no! - if (ProfileRepository.ConnectedDisplayIdentifiers.Contains(profileDisplayIdentifier)) + //if (ProfileRepository.ConnectedDisplayIdentifiers.Contains(profileDisplayIdentifier)) + //validDisplayCount = (from connectedDisplay in ProfileRepository.ConnectedDisplayIdentifiers select connectedDisplay == profileDisplayIdentifier).Count(); + if (ProfileRepository.ConnectedDisplayIdentifiers.Any(s => profileDisplayIdentifier.Equals(s))) validDisplayCount++; } if (validDisplayCount == ProfileDisplayIdentifiers.Count) diff --git a/DisplayMagicianShared/ProfileRepository.cs b/DisplayMagicianShared/ProfileRepository.cs index d40868d..e7f23e5 100644 --- a/DisplayMagicianShared/ProfileRepository.cs +++ b/DisplayMagicianShared/ProfileRepository.cs @@ -762,8 +762,6 @@ namespace DisplayMagicianShared // Get the list of connected devices ConnectedDisplayIdentifiers = GenerateAllAvailableDisplayIdentifiers(); - - if (_profilesLoaded && _allProfiles.Count > 0) { @@ -810,8 +808,6 @@ namespace DisplayMagicianShared // Create an array of all the important display info we need to record string[] displayInfo = { "NVIDIA", - myPhysicalGPU.CorrespondingLogicalGPU.ToString(), - myPhysicalGPU.ToString(), myPhysicalGPU.ArchitectInformation.ShortName.ToString(), myPhysicalGPU.ArchitectInformation.Revision.ToString(), myPhysicalGPU.Board.ToString(), @@ -958,8 +954,6 @@ namespace DisplayMagicianShared // Create an array of all the important display info we need to record string[] displayInfo = { "NVIDIA", - myPhysicalGPU.CorrespondingLogicalGPU.ToString(), - myPhysicalGPU.ToString(), myPhysicalGPU.ArchitectInformation.ShortName.ToString(), myPhysicalGPU.ArchitectInformation.Revision.ToString(), myPhysicalGPU.Board.ToString(),