From c87c432033f4277bc9995a4de1390a59b810a005 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Tue, 4 Aug 2015 13:23:25 +0200 Subject: [PATCH] Fix wxGetOsDescription() for Windows 10. Check for Windows 10 was implemented as check for version 6.4 but the final version of Windows 10 actually returns 10.0. --- docs/changes.txt | 1 + src/msw/utils.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 689e8c11ed..640acdb46f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -164,6 +164,7 @@ wxMSW: - Don't send bogus root selection events when clicking wxTreeCtrl (sbrowne). - Avoid bogus assert after calling wxDatePickerCtrl::SetRange(). - Add solution file for building with MSVS 2014 (Peter Tissen). +- Correct wxGetOsDescription() for Windows 10 (Tobias Taschner). wxOSX/Cocoa: diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index c91109d9cc..b7ec9bbec3 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1224,14 +1224,14 @@ wxString wxGetOsDescription() ? _("Windows Server 2012 R2") : _("Windows 8.1"); break; - - case 4: - str = wxIsWindowsServer() == 1 - ? _("Windows Server 10") - : _("Windows 10"); - break; } break; + + case 10: + str = wxIsWindowsServer() == 1 + ? _("Windows Server 10") + : _("Windows 10"); + break; } if ( str.empty() )