d3d: Add a test for releasing the device after destroying the window.
This commit is contained in:
parent
f57967c983
commit
7d3beb6b79
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue