d3d: Add a test for releasing the device after destroying the window.

This commit is contained in:
Henri Verbeet 2009-06-29 10:11:25 +02:00 committed by Alexandre Julliard
parent f57967c983
commit 7d3beb6b79
2 changed files with 4 additions and 4 deletions

View File

@ -1348,8 +1348,8 @@ cleanup:
ULONG refcount;
IDirect3DDevice8_GetCreationParameters(device_ptr, &creation_parameters);
DestroyWindow(creation_parameters.hFocusWindow);
refcount = IDirect3DDevice8_Release(device_ptr);
ok(!refcount, "Device has %u references left\n", refcount);
DestroyWindow(creation_parameters.hFocusWindow);
}
}

View File

@ -10498,15 +10498,15 @@ START_TEST(visual)
cleanup:
if(device_ptr) {
ULONG ref;
D3DPRESENT_PARAMETERS present_parameters;
IDirect3DSwapChain9 *swapchain;
ULONG ref;
IDirect3DDevice9_GetSwapChain(device_ptr, 0, &swapchain);
IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_parameters);
DestroyWindow(present_parameters.hDeviceWindow);
IDirect3DSwapChain9_Release(swapchain);
ref = IDirect3DDevice9_Release(device_ptr);
DestroyWindow(present_parameters.hDeviceWindow);
ok(ref == 0, "The device was not properly freed: refcount %u\n", ref);
}
}