Added additional checks to library mode matching

This commit is contained in:
Terry MacDonald 2021-09-22 20:37:10 +12:00
parent 48e27d30f9
commit 8b73a51fe3

View File

@ -1017,12 +1017,12 @@ namespace DisplayMagicianShared
// Figure out the Video Cards and see what mode we want
// Get a list of all the PCI Vendor IDs
List<string> videoCardVendors = WinLibrary.GetLibrary().GetCurrentPCIVideoCardVendors();
if (NVIDIALibrary.GetLibrary().PCIVendorIDs.All(value => videoCardVendors.Contains(value)))
if (NVIDIALibrary.GetLibrary().IsInstalled && NVIDIALibrary.GetLibrary().PCIVendorIDs.All(value => videoCardVendors.Contains(value)))
{
// We detected a NVIDIA video card in the computer
_currentVideoMode = VIDEO_MODE.NVIDIA;
}
else if (AMDLibrary.GetLibrary().PCIVendorIDs.All(value => videoCardVendors.Contains(value)))
else if (AMDLibrary.GetLibrary().IsInstalled && AMDLibrary.GetLibrary().PCIVendorIDs.All(value => videoCardVendors.Contains(value)))
{
// We detected an AMD video card in the computer
_currentVideoMode = VIDEO_MODE.AMD;