[PATCH 2/3] dwmapi: Use RtlGetVersion() for system version detection instead.
Jactry Zeng
jzeng at codeweavers.com
Wed May 11 02:44:20 CDT 2022
>From commit 6719bf2e037b, GetVersionExW() only returns the real
emulated system version when supportedOS is specified in the
application's manifest file, so let's use RtlGetVersion() instead.
Signed-off-by: Jactry Zeng <jzeng at codeweavers.com>
---
dlls/dwmapi/dwmapi_main.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index cec20220ec2..5293a22729b 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -21,6 +21,7 @@
#include <stdarg.h>
+#include "winternl.h"
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
@@ -37,18 +38,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwmapi);
*/
HRESULT WINAPI DwmIsCompositionEnabled(BOOL *enabled)
{
- OSVERSIONINFOW version;
+ RTL_OSVERSIONINFOEXW version;
TRACE("%p\n", enabled);
if (!enabled)
return E_INVALIDARG;
- version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
-
- if (!GetVersionExW(&version))
- *enabled = FALSE;
- else
+ *enabled = FALSE;
+ version.dwOSVersionInfoSize = sizeof(version);
+ if (!RtlGetVersion(&version))
*enabled = (version.dwMajorVersion > 6 || (version.dwMajorVersion == 6 && version.dwMinorVersion >= 3));
return S_OK;
--
2.35.1
More information about the wine-devel
mailing list