diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-08-24 17:26:02 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-08-24 17:26:02 +0000 |
commit | 63c51fd9c0fd1068c600e1486be8f99f0f163371 (patch) | |
tree | 0cafe76403fc3a6cd397a45912dba76a211b8980 /protocols/JabberG | |
parent | 9eb221eb262989a03c40847aa7391d753146c2dc (diff) |
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
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/jabber_iq_handlers.cpp | 27 |
1 files 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 )
|