]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
try to disable composition on Vista
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Wed, 8 Apr 2009 16:32:59 +0000 (16:32 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Wed, 8 Apr 2009 16:32:59 +0000 (16:32 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@311 61c419a2-8eb2-4b30-bcec-8cead039b335

radiant/main.cpp

index 4252ea225782dde17d5c5f58864d2e3ed43e86b2..03f186cb7ed67e264b62c309d632dfaf1031b6d7 100644 (file)
@@ -558,6 +558,18 @@ int main (int argc, char* argv[])
 
   streams_init();
 
+#ifdef WIN32
+  HMODULE lib;
+  lib = LoadLibrary("dwmapi.dll");
+  if(lib != 0)
+  {
+         void (WINAPI *DwmEnableComposition) (bool bEnable) = (void (WINAPI *) (bool bEnable)) GetProcAddress(lib, "DwmEnableComposition");
+         if(DwmEnableComposition)
+                 DwmEnableComposition(FALSE);
+         FreeLibrary(lib);
+  }
+#endif
+
   gtk_disable_setlocale();
   gtk_init(&argc, &argv);