Commit 0260f2dc authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

dwmapi: Use RtlGetVersion() for system version detection instead.

From commit 6719bf2e, 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: 's avatarJactry Zeng <jzeng@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2a44723d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment