Gijs Vermeulen : dwmapi: Implement DwmIsCompositionEnabled.

Alexandre Julliard julliard at winehq.org
Fri Sep 25 14:52:54 CDT 2020


Module: wine
Branch: master
Commit: 53375d0f7a32b8b95d8c717356b7223c6d68b262
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=53375d0f7a32b8b95d8c717356b7223c6d68b262

Author: Gijs Vermeulen <gijsvrm at gmail.com>
Date:   Tue Sep 22 17:56:37 2020 +0200

dwmapi: Implement DwmIsCompositionEnabled.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44055
Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwmapi/dwmapi_main.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index 8408a2efed..eb11ecb6b7 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -51,19 +51,20 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
  */
 HRESULT WINAPI DwmIsCompositionEnabled(BOOL *enabled)
 {
-    static int once;
-    if (!once)
-    {
-        FIXME("%p\n", enabled);
-        once = 1;
-    }
-    else
-        TRACE("%p\n", enabled);
+    OSVERSIONINFOW version;
+
+    TRACE("%p\n", enabled);
 
     if (!enabled)
         return E_INVALIDARG;
 
-    *enabled = FALSE;
+    version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
+
+    if (!GetVersionExW(&version))
+        *enabled = FALSE;
+    else
+        *enabled = (version.dwMajorVersion > 6 || (version.dwMajorVersion == 6 && version.dwMinorVersion >= 3));
+
     return S_OK;
 }
 




More information about the wine-cvs mailing list