On 15 July 2016 at 12:32, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
@@ -3984,6 +3985,8 @@ static void test_create_device_from_d3d1(void) ok(ref2 > ref1, "expected ref2 > ref1, got ref1 = %u , ref2 = %u.\n", ref1, ref2); device_ref2 = get_refcount((IUnknown *)d3ddevice1); ok(device_ref2 > device_ref1, "Expected device_ref2 > device_ref1, got device_ref1 = %u, device_ref2 = %u.\n", device_ref1, device_ref2);
- d3d_ref2 = get_refcount((IUnknown *)d3d1);
- ok(d3d_ref2 > d3d_ref1, "Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %u, d3d_ref2 = %u.\n", d3d_ref1, d3d_ref2); ret_val = IDirect3DRMDevice_GetWidth(device1); ok(ret_val == rc.right, "Expected device width = 300, got %u.\n", ret_val); ret_val = IDirect3DRMDevice_GetHeight(device1);
@@ -4053,6 +4056,133 @@ static void test_create_device_from_d3d1(void) device_ref2 = get_refcount((IUnknown *)d3ddevice1); ok(device_ref2 == device_ref1, "Expected device_ref2 == device_ref1, got device_ref1 = %u, device_ref2 = %u.\n", device_ref1, device_ref2);
- /* InitFromD3D tests */
- hr = IDirect3DRM_CreateObject(d3drm1, &CLSID_CDirect3DRMDevice, NULL, &IID_IDirect3DRMDevice, (void **)&device1);
- ok(SUCCEEDED(hr), "Cannot get IDirect3DRMDevice interface (hr = %#x).\n", hr);
- hr = IDirect3DRMDevice_InitFromD3D(device1, NULL, d3ddevice1);
- ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr);
- hr = IDirect3DRMDevice_InitFromD3D(device1, d3d1, NULL);
- ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %#x.\n", hr);
- hr = IDirect3DRMDevice_InitFromD3D(device1, d3d1, d3ddevice1);
- ok(SUCCEEDED(hr), "Failed to initialise IDirect3DRMDevice interface (hr = %#x)\n", hr);
- ref2 = get_refcount((IUnknown *)d3drm1);
- ok(ref2 > ref1, "expected ref2 > ref1, got ref1 = %u , ref2 = %u.\n", ref1, ref2);
- device_ref2 = get_refcount((IUnknown *)d3ddevice1);
- ok(device_ref2 > device_ref1, "Expected device_ref2 > device_ref1, got device_ref1 = %u, device_ref2 = %u.\n", device_ref1, device_ref2);
I've just fixed some these up in the past, and let some others slide, but please watch your line length.