From 4bff5a2e20ac51e0cc7feb8e03a0b2885395b8f9 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 8 Apr 2009 16:32:59 +0000 Subject: [PATCH] try to disable composition on Vista git-svn-id: svn://svn.icculus.org/netradiant/trunk@311 61c419a2-8eb2-4b30-bcec-8cead039b335 --- radiant/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/radiant/main.cpp b/radiant/main.cpp index 4252ea22..03f186cb 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -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); -- 2.39.2