All: Optimized IsWindows11 routine
This commit is contained in:
@@ -40,6 +40,10 @@ IEPWeather* epw = NULL;
|
||||
SRWLOCK lock_epw = { .Ptr = SRWLOCK_INIT };
|
||||
#endif
|
||||
|
||||
#ifndef _WIN64
|
||||
RTL_OSVERSIONINFOW global_rovi;
|
||||
#endif
|
||||
|
||||
#define WINX_ADJUST_X 5
|
||||
#define WINX_ADJUST_Y 5
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <Wininet.h>
|
||||
#pragma comment(lib, "Wininet.lib")
|
||||
|
||||
RTL_OSVERSIONINFOW global_rovi;
|
||||
|
||||
#pragma region "Weird stuff"
|
||||
INT64 STDMETHODCALLTYPE nimpl4_1(INT64 a1, DWORD* a2)
|
||||
{
|
||||
|
||||
@@ -571,10 +571,11 @@ BOOL PleaseWait_UpdateTimeout(int timeout);
|
||||
VOID CALLBACK PleaseWait_TimerProc(HWND hWnd, UINT uMsg, UINT idEvent, DWORD dwTime);
|
||||
LRESULT CALLBACK PleaseWait_HookProc(int code, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
extern RTL_OSVERSIONINFOW global_rovi;
|
||||
inline BOOL IsWindows11()
|
||||
{
|
||||
RTL_OSVERSIONINFOW rovi;
|
||||
if (VnGetOSVersion(&rovi) && rovi.dwBuildNumber >= 21996)
|
||||
if (!global_rovi.dwMajorVersion) VnGetOSVersion(&global_rovi);
|
||||
if (global_rovi.dwBuildNumber >= 21996)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user