On 30 August 2013 17:09, Michael Müller michael@fds-team.de wrote:
- /* Get the implicit swapchain */
- hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain);
- ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08x)\n", hr);
- if (SUCCEEDED(hr))
- {
hr = IDirect3DSwapChain9_QueryInterface(swapchain, &IID_IDirect3DSwapChain9Ex, (void **) &swapchainEx);
ok(hr == E_NOINTERFACE,
"IDirect3DSwapChain9::QueryInterface for IID_IDirect3DSwapChain9Ex returned %08x, expected E_NOINTERFACE\n",
hr);
ok(swapchainEx == NULL, "QueryInterface returned interface %p, expected NULL\n", swapchainEx);
if(swapchainEx) IDirect3DSwapChain9Ex_Release(swapchainEx);
- }
- if(swapchain) IDirect3DSwapChain9_Release(swapchain);
It probably wouldn't hurt to have a test for the other case as well. I.e., that you can get an IDirect3DSwapChain9Ex interface from a device created from an IDirect3D9Ex interface.