Adds Windows Server 2012 and Windows 8 detection to os_getversion as per the details from http://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx

This commit is contained in:
Liam Devine 2013-01-09 22:06:49 +00:00
parent 974d1a7d04
commit 06aea5ebd0

View File

@ -135,6 +135,17 @@ void getversion(struct OsVersionInfo* info)
info->description = "Windows 7";
}
}
else if (versionInfo.dwMajorVersion == 6 && versionInfo.dwMinorVersion == 2 )
{
if (versionInfo.wProductType != VER_NT_WORKSTATION)
{
info->description = "Windows Server 2012";
}
else
{
info->description = "Windows 8";
}
}
else
{
info->description = "Windows";