Commit 7d3beb6b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent f57967c9
......@@ -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);
}
}
......@@ -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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment