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:
PB
2024-06-09 12:36:55 +02:00
committed by Vadim Zeitlin
parent 26997ae140
commit d00148de08
2 changed files with 16 additions and 3 deletions
+4
View File
@@ -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
View File
@@ -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;
}