mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-23 23:21:08 +01:00
All: Fixed a bug that crashed explorer
on OS builds lower than 22621 (Windows 11 22H2)
This commit is contained in:
parent
2607f9ab05
commit
dfee1aee37
@ -59,37 +59,32 @@ inline HRESULT SetMicaMaterialForThisWindow(HWND hWnd, BOOL bApply)
|
|||||||
inline BOOL IsWindows11Version22H2OrHigher()
|
inline BOOL IsWindows11Version22H2OrHigher()
|
||||||
{
|
{
|
||||||
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
||||||
if (global_rovi.dwBuildNumber >= 22621) return TRUE;
|
return global_rovi.dwBuildNumber >= 22621;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline BOOL IsWindows11BuildHigherThan22631()
|
inline BOOL IsWindows11Version23H2OrHigher()
|
||||||
{
|
{
|
||||||
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
||||||
if (global_rovi.dwBuildNumber > 22631) return TRUE;
|
return global_rovi.dwBuildNumber >= 22631;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline BOOL IsWindows11BuildHigherThan25158()
|
inline BOOL IsWindows11BuildHigherThan25158()
|
||||||
{
|
{
|
||||||
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
||||||
if (global_rovi.dwBuildNumber > 25158) return TRUE;
|
return global_rovi.dwBuildNumber > 25158;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline BOOL IsWindows11Version22H2Build1413OrHigher()
|
inline BOOL IsWindows11Version22H2Build1413OrHigher()
|
||||||
{
|
{
|
||||||
if (IsWindows11BuildHigherThan22631()) return TRUE;
|
|
||||||
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
||||||
if (global_ubr >= 1413) return TRUE;
|
if (global_rovi.dwBuildNumber > 22621) return TRUE;
|
||||||
return FALSE;
|
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 1413;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline BOOL IsWindows11Version22H2Build2134OrHigher()
|
inline BOOL IsWindows11Version22H2Build2134OrHigher()
|
||||||
{
|
{
|
||||||
if (IsWindows11BuildHigherThan22631()) return TRUE;
|
|
||||||
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
|
||||||
if (global_ubr >= 2134) return TRUE;
|
if (global_rovi.dwBuildNumber > 22621) return TRUE;
|
||||||
return FALSE;
|
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 2134;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user