From a8c98a119145a77b1313337314853de75562e4ab Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Tue, 4 Aug 2015 15:04:33 +0200 Subject: [PATCH] Fix wxGetWinVersion() 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. --- include/wx/msw/private.h | 4 ++-- src/msw/utils.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 10aac4ae97..36729b06d4 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -935,7 +935,7 @@ inline wxString wxGetFullModuleName() // 0x0601 Windows 7 // 0x0602 Windows 8 (currently also returned for 8.1 if program does not have a manifest indicating 8.1 support) // 0x0603 Windows 8.1 (currently only returned for 8.1 if program has a manifest indicating 8.1 support) -// 0x0604 Windows 10 (currently only returned for 10 if program has a manifest indicating 10 support) +// 0x1000 Windows 10 (currently only returned for 10 if program has a manifest indicating 10 support) // // for the other Windows versions 0 is currently returned enum wxWinVersion @@ -968,7 +968,7 @@ enum wxWinVersion wxWinVersion_8 = 0x602, wxWinVersion_8_1 = 0x603, - wxWinVersion_10 = 0x604 + wxWinVersion_10 = 0x1000 }; WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion(); diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index b7ec9bbec3..974534be61 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1391,10 +1391,11 @@ wxWinVersion wxGetWinVersion() case 3: return wxWinVersion_8_1; - case 4: - return wxWinVersion_10; - } + } break; + + case 10: + return wxWinVersion_10; } default: // Do nothing just to silence GCC warning