-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
Am 2013-08-30 10:19, schrieb Michael Müller: > This patch implements the IDirect3DSwapChain9Ex interface as an > extension of IDirect3DSwapChain9 and thus fixes bug 34252 - > "Silverlight accelerated graphics cause a D3D critical section > lockup" since Silverlight does no longer try to create a Direct3D > context in an endless loop. The functions > d3d9_swapchain_GetLastPresentCount and > d3d9_swapchain_GetPresentStatistics are just stubs so far. Good work on finding out what causes that bug! > - if (IsEqualGUID(riid, &IID_IDirect3DSwapChain9) + if > (IsEqualGUID(riid, &IID_IDirect3DSwapChain9) || IsEqualGUID(riid, > &IID_IDirect3DSwapChain9Ex) || IsEqualGUID(riid, &IID_IUnknown)) For IDirect3D9Ex and IDirect3DDevice9Ex, the Ex versions are only available if IDirect3D9 was created with the extended method. I suspect swapchains are the same. Please write some tests for this. > + TRACE("iface %p, pLastPresentCount %p.\n", iface, pLastPresentCount); > + WARN("not implemented.\n"); If a function is not implemented we write a FIXME, e.g. FIXME("iface %p, pLastPresentCount %p, stub!\n", iface, pLastPresentCount); If this causes too much spam on the console, you can use a static variable to print it just once. > + if (SUCCEEDED(hr)) + { + if(pMode){ Please use a code style that is consistent with the rest of the file. Tbh the existing files aren't as consistent as we'd like. The general rule is a space between if and (, and { in newlines. 4 spaces intendation. If there's a one-line statement in an if, put that statement in a new line and don't write curly brackets. My personal opinion, and the style I use, is to use brackets for both branches of an if-else if one of those branches has more than one line. > - * IDirect3DSwapChain9 interface + * IDirect3DSwapChain9(Ex) > interface */ #define INTERFACE IDirect3DSwapChain9 > DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown) You have to create a new interface declaration named IDirect3DSwapChain9Ex with all the methods and the invocation macros. The header change should go in a separate patch. The d3d9 code should be changed to always use IDirect3D9Swapchain9Ex, like it does for device and direct3d. Thanks for your work! Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSIFimAAoJEN0/YqbEcdMwbW0P/jC/gsziWzCtxBH1gDETnX6+ j0csX5cORWKCaq/wsPbT9ZDVV/OYFYlWRB0QZiJIUWAp4PzdGXCxQN8srdybT1hp PG3HTDzv4Kmq57fYSXEoLnZNO/pgfr4JiGmhcwQSyheJ1+lcb5Z/GE09goHwcLce CJVrIQu9f05TQb+r0BJCxIyGAIuq8to7xdIJ1tPR2MmKwYzS0XWkB1yN8QIGy/Qm z4aH7JGsOJ37t/90D4eHVBX6EtiI6pRHHiaO3hFrgYiu7wf/CeiE3E9QWnwycG1h DdPWjreQx+6/JQfg71eXDW81WYgdRl7TfMfBOc8UFh7Byj9b4llR0E+NFSkQ81NL XAQkB/PthmEpJIH1tSo91aNrZkfN/jw7D1gA4kUHFEtr5n1yuUXQQvKLYEOMWrV0 lV1plnzzLEZa50c0Y3/zCgQFCbzgo47ohO/4msMHOU33n255oJg/Bd6CLoA1oPFq hxQkkv0bW5VL6Jn0WVAC1FPjfmRF6zD6h9n8KKPWU2rz/tmkoEhoJ0Nd2a483N86 6EvOTpecczmNBlICFvyUOVAisHnVdwk+cPI+6hoqHBq0C7fGXi7R41pDOvf4o1yH wZyMH4e+kiG+7qaeGRwsTEDW1V77VAbPXJkNZPU2Wvb/gVzLU1TVQ87Bz5T83tpv tFvZjJrjOYO4qL4Afm14 =zjgo -----END PGP SIGNATURE-----