From 11e25caa878183f2121dd863947ea2306344ae95 Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Thu, 13 Sep 2012 18:04:52 -0600 Subject: [PATCH] Added Windows 8 and Windows Server 2012 support for SysInfo plugin --- Plugins/PluginSysInfo/SysInfo.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Plugins/PluginSysInfo/SysInfo.cpp b/Plugins/PluginSysInfo/SysInfo.cpp index bb289b23..87f19a1f 100644 --- a/Plugins/PluginSysInfo/SysInfo.cpp +++ b/Plugins/PluginSysInfo/SysInfo.cpp @@ -399,8 +399,8 @@ PLUGIN_EXPORT double Update(void* data) : GetSystemMetrics(SM_CYSCREEN); case MEASURE_VIRTUAL_SCREEN_WIDTH: - return GetSystemMetrics(SM_CXVIRTUALSCREEN); + case MEASURE_VIRTUAL_SCREEN_HEIGHT: return GetSystemMetrics(SM_CYVIRTUALSCREEN); @@ -466,7 +466,15 @@ LPCWSTR GetPlatformName() } 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"; }