fix gpu detection #33

Merged
fyr77 merged 1 commit from v2 into master 2023-08-11 19:45:57 +02:00

View file

@ -220,7 +220,7 @@ namespace EnvyUpdate
foreach (var name in names) // Looping through the XML Doc because the name is not the primary key foreach (var name in names) // Looping through the XML Doc because the name is not the primary key
{ {
string sName = name.Value.ToString().ToLower(); string sName = name.Value.ToString().ToLower();
if (sName == query) if (sName.Contains(query))
{ {
Debug.LogToFile("INFO Matched GetValueFromName query: " + sName); Debug.LogToFile("INFO Matched GetValueFromName query: " + sName);
string cleanResult = null; string cleanResult = null;
@ -335,7 +335,7 @@ namespace EnvyUpdate
{ {
GPUName = obj["VideoProcessor"].ToString().ToLower(); GPUName = obj["VideoProcessor"].ToString().ToLower();
// Remove any 3GB, 6GB or similar from name. We don't need to know the VRAM to get results. // Remove any 3GB, 6GB or similar from name. We don't need to know the VRAM to get results.
GPUName = Regex.Match(GPUName, "(geforce )?.tx \\w*\\d*( ti)?").Value; GPUName = Regex.Match(GPUName, "(geforce )((.tx )|(mx))?\\w*\\d*( ti)?").Value;
} }
else else
GPUName = obj["VideoProcessor"].ToString(); GPUName = obj["VideoProcessor"].ToString();