Added Windows 8 and Windows Server 2012 support for SysInfo plugin

This commit is contained in:
Brian Ferguson 2012-09-13 18:04:52 -06:00
parent 041d562484
commit 11e25caa87

View File

@ -399,8 +399,8 @@ PLUGIN_EXPORT double Update(void* data)
: GetSystemMetrics(SM_CYSCREEN); : GetSystemMetrics(SM_CYSCREEN);
case MEASURE_VIRTUAL_SCREEN_WIDTH: case MEASURE_VIRTUAL_SCREEN_WIDTH:
return GetSystemMetrics(SM_CXVIRTUALSCREEN); return GetSystemMetrics(SM_CXVIRTUALSCREEN);
case MEASURE_VIRTUAL_SCREEN_HEIGHT: case MEASURE_VIRTUAL_SCREEN_HEIGHT:
return GetSystemMetrics(SM_CYVIRTUALSCREEN); return GetSystemMetrics(SM_CYVIRTUALSCREEN);
@ -466,7 +466,15 @@ LPCWSTR GetPlatformName()
} }
else else
{ {
if (osvi.dwMinorVersion == 1 && osvi.wProductType == VER_NT_WORKSTATION) if (osvi.dwMinorVersion == 2 && osvi.wProductType == VER_NT_WORKSTATION)
{
return L"Windows 8";
}
else if (osvi.dwMinorVersion == 2 && osvi.wProductType != VER_NT_WORKSTATION)
{
return L"Windows Server 2012";
}
else if (osvi.dwMinorVersion == 1 && osvi.wProductType == VER_NT_WORKSTATION)
{ {
return L"Windows 7"; return L"Windows 7";
} }