quartz/tests: Fix test failures when we can't create a 3D device.

It turns out my prior assumption was incorrect.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-03-21 16:35:20 -05:00 committed by Alexandre Julliard
parent a336ae8fbb
commit e417befc15
1 changed files with 9 additions and 4 deletions

View File

@ -2376,11 +2376,14 @@ static IDirect3DDevice9 *create_device(HWND window)
d3d = Direct3DCreate9(D3D_SDK_VERSION);
ok(!!d3d, "Failed to create a D3D object.\n");
/* We can expect this to succeed, or we couldn't have created the VMR. */
hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device);
ok(hr == D3D_OK, "Failed to create a 3D device, hr %#x.\n", hr);
IDirect3D9_Release(d3d);
if (FAILED(hr))
{
skip("Failed to create a 3D device, hr %#x.\n", hr);
return NULL;
}
return device;
}
@ -2418,7 +2421,8 @@ static void test_allocate_surface_helper(void)
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
window = CreateWindowA("static", "quartz_test", WS_OVERLAPPEDWINDOW, 0, 0,
rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, NULL);
device = create_device(window);
if (!(device = create_device(window)))
goto out;
hr = IVMRSurfaceAllocatorNotify9_SetD3DDevice(notify, device, MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY));
if (hr == E_NOINTERFACE)
@ -2784,7 +2788,8 @@ static void test_renderless_formats(void)
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
window = CreateWindowA("static", "quartz_test", WS_OVERLAPPEDWINDOW, 0, 0,
rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, NULL);
device = create_device(window);
if (!(device = create_device(window)))
goto out;
hr = IVMRSurfaceAllocatorNotify9_SetD3DDevice(notify, device, MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY));
if (hr == E_NOINTERFACE)