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).
|
- Correct wxGetOsDescription() for Windows 10 (Tobias Taschner).
|
||||||
- Make wxListCtrl &c appearance more native on modern systems (Tobias Taschner).
|
- Make wxListCtrl &c appearance more native on modern systems (Tobias Taschner).
|
||||||
- Don't send wxActivateEvent for minimized windows (bzcdr).
|
- 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:
|
wxOSX/Cocoa:
|
||||||
|
|
||||||
|
@@ -1009,14 +1009,17 @@ OSVERSIONINFOEXW wxGetWindowsVersionInfo()
|
|||||||
// RtlGetVersion() directly, if it is available.
|
// RtlGetVersion() directly, if it is available.
|
||||||
#if wxUSE_DYNLIB_CLASS
|
#if wxUSE_DYNLIB_CLASS
|
||||||
wxDynamicLibrary dllNtDll;
|
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*);
|
typedef LONG /* NTSTATUS */ (WINAPI *RtlGetVersion_t)(OSVERSIONINFOEXW*);
|
||||||
|
|
||||||
RtlGetVersion_t wxDL_INIT_FUNC(pfn, RtlGetVersion, dllNtDll);
|
RtlGetVersion_t wxDL_INIT_FUNC(pfn, RtlGetVersion, dllNtDll);
|
||||||
if ( pfnRtlGetVersion && pfnRtlGetVersion(&info) )
|
if ( pfnRtlGetVersion &&
|
||||||
|
(pfnRtlGetVersion(&info) == 0 /* STATUS_SUCCESS */) )
|
||||||
|
{
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // wxUSE_DYNLIB_CLASS
|
#endif // wxUSE_DYNLIB_CLASS
|
||||||
|
|
||||||
#ifdef __VISUALC__
|
#ifdef __VISUALC__
|
||||||
|
Reference in New Issue
Block a user