From 63c51fd9c0fd1068c600e1486be8f99f0f163371 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 24 Aug 2012 17:26:02 +0000 Subject: Jabber: Added Windows 8 detection (from Crash Dumper Code, not tested) git-svn-id: http://svn.miranda-ng.org/main/trunk@1528 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/jabber_iq_handlers.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp index 0ae93ec014..7ccbd31e01 100644 --- a/protocols/JabberG/jabber_iq_handlers.cpp +++ b/protocols/JabberG/jabber_iq_handlers.cpp @@ -105,11 +105,30 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE) // Test for the specific product. - if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 ) + if (osvi.dwMajorVersion == 6) { - if ( osvi.wProductType == VER_NT_WORKSTATION ) - StringCchCat(pszOS, BUFSIZE, TEXT("Windows 7 ")); - else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 R2 " )); + switch (osvi.dwMinorVersion) + { + case 0: + if (osvi.wProductType == VER_NT_WORKSTATION) + StringCchCat(pszOS, BUFSIZE, TEXT("Windows Vista ")); + else + StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 ")); + break; + + case 1: + if (osvi.wProductType == VER_NT_WORKSTATION) + StringCchCat(pszOS, BUFSIZE, TEXT("Windows 7 ")); + else + StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 R2 ")); + break; + + default: + if (osvi.wProductType == VER_NT_WORKSTATION) + StringCchCat(pszOS, BUFSIZE, TEXT("Windows 8 ")); + else + StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2012 ")); + break; } if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) -- cgit v1.2.3