From: divverent Date: Wed, 8 Apr 2009 16:32:59 +0000 (+0000) Subject: try to disable composition on Vista X-Git-Tag: svn-r421~109 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4bff5a2e20ac51e0cc7feb8e03a0b2885395b8f9;p=xonotic%2Fnetradiant.git try to disable composition on Vista git-svn-id: svn://svn.icculus.org/netradiant/trunk@311 61c419a2-8eb2-4b30-bcec-8cead039b335 --- 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);