Really fix OS version detection for Windows 8.1 and later
Fix several problems in d61b52a60e
.
See #15321.
Closes https://github.com/wxWidgets/wxWidgets/pull/114
This commit is contained in:
@@ -181,7 +181,7 @@ wxMSW:
|
||||
- Correct wxGetOsDescription() for Windows 10 (Tobias Taschner).
|
||||
- Make wxListCtrl &c appearance more native on modern systems (Tobias Taschner).
|
||||
- Don't send wxActivateEvent for minimized windows (bzcdr).
|
||||
- Return correct OS version under Windows 8 and later.
|
||||
- Return correct OS version under Windows 8.1 and later.
|
||||
|
||||
wxOSX/Cocoa:
|
||||
|
||||
|
@@ -1009,13 +1009,16 @@ OSVERSIONINFOEXW wxGetWindowsVersionInfo()
|
||||
// RtlGetVersion() directly, if it is available.
|
||||
#if wxUSE_DYNLIB_CLASS
|
||||
wxDynamicLibrary dllNtDll;
|
||||
if ( dllNtDll.RawLoad(wxS("ntdll.dll")) )
|
||||
if ( dllNtDll.Load(wxS("ntdll.dll"), wxDL_VERBATIM | wxDL_QUIET) )
|
||||
{
|
||||
typedef LONG /* NTSTATUS */ (WINAPI *RtlGetVersion_t)(OSVERSIONINFOEXW*);
|
||||
|
||||
RtlGetVersion_t wxDL_INIT_FUNC(pfn, RtlGetVersion, dllNtDll);
|
||||
if ( pfnRtlGetVersion && pfnRtlGetVersion(&info) )
|
||||
if ( pfnRtlGetVersion &&
|
||||
(pfnRtlGetVersion(&info) == 0 /* STATUS_SUCCESS */) )
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_DYNLIB_CLASS
|
||||
|
||||
|
Reference in New Issue
Block a user