d3d9: Release the window after the visual tests.

oldstable
Stefan Dösinger 2007-11-06 20:05:49 +01:00 committed by Alexandre Julliard
parent d050b4de9e
commit b4b10d8bc2
1 changed files with 9 additions and 1 deletions

View File

@ -4426,5 +4426,13 @@ START_TEST(visual)
else skip("No ps_1_1 support\n");
cleanup:
if(device_ptr) IDirect3DDevice9_Release(device_ptr);
if(device_ptr) {
D3DPRESENT_PARAMETERS present_parameters;
IDirect3DSwapChain9 *swapchain;
IDirect3DDevice9_GetSwapChain(device_ptr, 0, &swapchain);
IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_parameters);
IDirect3DSwapChain9_Release(swapchain);
IDirect3DDevice9_Release(device_ptr);
DestroyWindow(present_parameters.hDeviceWindow);
}
}