From 1966dfb17d7cb106d1dfb44df6a15b92ba3b8d5f Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Sat, 20 Dec 2014 10:13:21 +0000 Subject: [PATCH] Add Windows 10 support to wxGetWinVersion() and wxGetOsDescription(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/private.h | 5 ++++- src/msw/utils.cpp | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index afa0459a53..fcb27c260c 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -949,6 +949,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) // // for the other Windows versions 0 is currently returned enum wxWinVersion @@ -979,7 +980,9 @@ enum wxWinVersion wxWinVersion_7 = 0x601, wxWinVersion_8 = 0x602, - wxWinVersion_8_1 = 0x603 + wxWinVersion_8_1 = 0x603, + + wxWinVersion_10 = 0x604 }; WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion(); diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 49ded076cc..482a9b9e0f 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1204,6 +1204,12 @@ wxString wxGetOsDescription() ? _("Windows Server 2012 R2") : _("Windows 8.1"); break; + + case 4: + str = wxIsWindowsServer() == 1 + ? _("Windows Server 10") + : _("Windows 10"); + break; } break; } @@ -1364,7 +1370,10 @@ wxWinVersion wxGetWinVersion() case 3: return wxWinVersion_8_1; - } + + case 4: + return wxWinVersion_10; + } break; } default: