-----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