From: Vadim Zeitlin Date: Tue, 27 May 2008 15:48:23 +0000 (+0000) Subject: recognize Vista by name in wxGetOsDescription() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a284cce85fc4c1136b82262bfaac3bdf97535433 recognize Vista by name in wxGetOsDescription() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 4e674fcbde..d86d45d0c5 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1131,24 +1131,37 @@ wxString wxGetOsDescription() break; case VER_PLATFORM_WIN32_NT: - if ( info.dwMajorVersion == 5 ) + switch ( info.dwMajorVersion ) { - switch ( info.dwMinorVersion ) - { - case 0: - str.Printf(_("Windows 2000 (build %lu"), - info.dwBuildNumber); - break; - case 1: - str.Printf(_("Windows XP (build %lu"), - info.dwBuildNumber); - break; - case 2: - str.Printf(_("Windows Server 2003 (build %lu"), + case 5: + switch ( info.dwMinorVersion ) + { + case 0: + str.Printf(_("Windows 2000 (build %lu"), + info.dwBuildNumber); + break; + + case 1: + str.Printf(_("Windows XP (build %lu"), + info.dwBuildNumber); + break; + + case 2: + str.Printf(_("Windows Server 2003 (build %lu"), + info.dwBuildNumber); + break; + } + break; + + case 6: + if ( info.dwMinorVersion == 0 ) + { + str.Printf(_("Windows Vista (build %lu"), info.dwBuildNumber); - break; - } + } + break; } + if ( str.empty() ) { str.Printf(_("Windows NT %lu.%lu (build %lu"), @@ -1156,6 +1169,7 @@ wxString wxGetOsDescription() info.dwMinorVersion, info.dwBuildNumber); } + if ( !wxIsEmpty(info.szCSDVersion) ) { str << _T(", ") << info.szCSDVersion;