1
0
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:
Amrsatrio 2023-09-23 11:46:02 +07:00
parent 2607f9ab05
commit dfee1aee37

View File

@ -59,37 +59,32 @@ inline HRESULT SetMicaMaterialForThisWindow(HWND hWnd, BOOL bApply)
inline BOOL IsWindows11Version22H2OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_rovi.dwBuildNumber >= 22621) return TRUE;
return FALSE;
return global_rovi.dwBuildNumber >= 22621;
}
inline BOOL IsWindows11BuildHigherThan22631()
inline BOOL IsWindows11Version23H2OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_rovi.dwBuildNumber > 22631) return TRUE;
return FALSE;
return global_rovi.dwBuildNumber >= 22631;
}
inline BOOL IsWindows11BuildHigherThan25158()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_rovi.dwBuildNumber > 25158) return TRUE;
return FALSE;
return global_rovi.dwBuildNumber > 25158;
}
inline BOOL IsWindows11Version22H2Build1413OrHigher()
{
if (IsWindows11BuildHigherThan22631()) return TRUE;
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_ubr >= 1413) return TRUE;
return FALSE;
if (global_rovi.dwBuildNumber > 22621) return TRUE;
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 1413;
}
inline BOOL IsWindows11Version22H2Build2134OrHigher()
{
if (IsWindows11BuildHigherThan22631()) return TRUE;
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_ubr >= 2134) return TRUE;
return FALSE;
if (global_rovi.dwBuildNumber > 22621) return TRUE;
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 2134;
}
#endif