potential solution for #31?

This commit is contained in:
Jakob 2023-07-08 23:18:53 +02:00
parent 645c9e72d2
commit 90fc53ce00
2 changed files with 33 additions and 23 deletions

View file

@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.18")] [assembly: AssemblyVersion("2.19")]
[assembly: AssemblyFileVersion("2.18")] [assembly: AssemblyFileVersion("2.19")]

View file

@ -153,11 +153,24 @@ namespace EnvyUpdate
Debug.LogToFile("INFO Got Nvidia GPU list."); Debug.LogToFile("INFO Got Nvidia GPU list.");
if (xmlcontent == null) if (xmlcontent == null)
{
Debug.LogToFile("WARN GPU list is NULL! This is a possible error source."); Debug.LogToFile("WARN GPU list is NULL! This is a possible error source.");
switch (IDtype)
{
case "osid":
id = GetOSID();
Debug.LogToFile("WARN Ignore previous warning, just getting osid.");
Debug.LogToFile("INFO Got osid: " + id);
break;
default:
Debug.LogToFile("WARN GetIDs was called, but nothing was specified.");
break;
}
}
else
{
XDocument xDoc = XDocument.Parse(xmlcontent); XDocument xDoc = XDocument.Parse(xmlcontent);
string gpuName = GetGPUName(true); string gpuName = GetGPUName(true);
switch (IDtype) switch (IDtype)
{ {
case "psid": case "psid":
@ -168,14 +181,11 @@ namespace EnvyUpdate
id = GetValueFromName(xDoc, gpuName, false); id = GetValueFromName(xDoc, gpuName, false);
Debug.LogToFile("INFO Got pfid: " + id); Debug.LogToFile("INFO Got pfid: " + id);
break; break;
case "osid":
id = GetOSID();
Debug.LogToFile("INFO Got osid: " + id);
break;
default: default:
Debug.LogToFile("WARN GetIDs was called, but nothing was specified."); Debug.LogToFile("WARN GetIDs was called, but nothing was specified.");
break; break;
} }
}
return id; return id;
} }