Bug 789830 - Graphics driver DriverVersion and DriverDate no longer present in registry with some Windows 8 installs, breaking about:support and driver blacklisting. Assume a driver version of 0.0.0.0 in such cases. r=joe

This commit is contained in:
Siddharth Agarwal 2012-09-17 23:26:24 +05:30
parent 8946c36817
commit e842bcc287

View File

@ -315,12 +315,20 @@ GfxInfo::Init()
/* we've found the driver we're looking for */
dwcbData = sizeof(value);
result = RegQueryValueExW(key, L"DriverVersion", NULL, NULL, (LPBYTE)value, &dwcbData);
if (result == ERROR_SUCCESS)
if (result == ERROR_SUCCESS) {
mDriverVersion = value;
} else {
// If the entry wasn't found, assume the worst (0.0.0.0).
mDriverVersion.AssignLiteral("0.0.0.0");
}
dwcbData = sizeof(value);
result = RegQueryValueExW(key, L"DriverDate", NULL, NULL, (LPBYTE)value, &dwcbData);
if (result == ERROR_SUCCESS)
if (result == ERROR_SUCCESS) {
mDriverDate = value;
} else {
// Again, assume the worst
mDriverDate.AssignLiteral("01-01-1970");
}
RegCloseKey(key);
break;
}