mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-22 14:20:35 +08:00
Recognize Windows Server 2019 in wxGetOsDescription()
For some reason, testing for Windows Server 2019 was missing there.
See #24598.
(cherry picked from commit c7c6485c59)
This commit is contained in:
@@ -262,6 +262,10 @@ wxGTK:
|
||||
- Fix wxListBox minimum size regression in 3.2.5 (#24551).
|
||||
- Allow positioning wxDialog at specified position, at least under X11 (#24552).
|
||||
|
||||
wxMSW:
|
||||
|
||||
- Recognize Windows Server 2019 in wxGetOsDescription() (PB, #24598).
|
||||
|
||||
wxOSX:
|
||||
|
||||
- Improve wxSlider ticks appearance (Hartwig Wiesmann, #24532).
|
||||
|
||||
+12
-3
@@ -1097,6 +1097,8 @@ int wxIsWindowsServer()
|
||||
return -1;
|
||||
}
|
||||
|
||||
static const int WINDOWS_SERVER2019_BUILD = 17763;
|
||||
|
||||
// Windows 11 uses the same version as Windows 10 but its build numbers start
|
||||
// from 22000, which provides a way to test for it.
|
||||
static const int FIRST_WINDOWS11_BUILD = 22000;
|
||||
@@ -1165,13 +1167,20 @@ wxString wxGetOsDescription()
|
||||
|
||||
case 10:
|
||||
if (info.dwBuildNumber >= FIRST_WINDOWS11_BUILD)
|
||||
{
|
||||
str = wxIsWindowsServer() == 1
|
||||
? "Windows Server 2022"
|
||||
: "Windows 11";
|
||||
|
||||
}
|
||||
else if ( wxIsWindowsServer() == 1 )
|
||||
{
|
||||
str = info.dwBuildNumber >= WINDOWS_SERVER2019_BUILD
|
||||
? "Windows Server 2019"
|
||||
: "Windows Server 2016";
|
||||
}
|
||||
else
|
||||
str = wxIsWindowsServer() == 1
|
||||
? "Windows Server 2016"
|
||||
: "Windows 10";
|
||||
str = "Windows 10";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user