Merge branch 'master' of github.com:yvt/openspades

This commit is contained in:
yvt 2017-01-07 23:06:52 +09:00
commit 9ac55ffece

View File

@ -22,31 +22,23 @@ std::string VersionInfo::GetVersionInfo() {
if (IsWindowsXPOrGreater() && !IsWindowsVistaOrGreater()) {
windowsVersion = "Windows XP";
}
if (IsWindowsVistaOrGreater() && !IsWindows7OrGreater()) {
} else if (IsWindowsVistaOrGreater() && !IsWindows7OrGreater()) {
windowsVersion = "Windows Vista";
}
if (IsWindows7OrGreater() && !IsWindows8OrGreater()) {
} else if (IsWindows7OrGreater() && !IsWindows8OrGreater()) {
windowsVersion = "Windows 7";
}
if (IsWindows8OrGreater() && !IsWindows8Point1OrGreater()) {
} else if (IsWindows8OrGreater() && !IsWindows8Point1OrGreater()) {
windowsVersion = "Windows 8";
}
if (IsWindows8Point1OrGreater()) {
} else if (IsWindows8Point1OrGreater()) {
windowsVersion = "Windows 8.1";
} else {
// Default to Windows 10
// See https://github.com/yvt/openspades/pull/528 for reason.
windowsVersion = "Windows 10";
}
// Might be a greater version, but the new Microsoft
// API doesn't support checking for specific versions.
// Default to Windows 10
// See https://github.com/yvt/openspades/pull/528 for reason.
windowsVersion = "Windows 10";
if (IsWindowsServer())
windowsVersion += " Server";
return windowsVersion;