-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-06-23 um 20:19 schrieb Aaryaman Vasishta:
- hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, coop_level);
- ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
As long as you're always passing coop_level = DDSCL_NORMAL I don't think there's a need for the parameter.
- if (coop_level & DDSCL_NORMAL)
- {
IDirectDrawClipper *clipper;
hr = IDirectDraw2_CreateClipper(ddraw, 0, &clipper, NULL);
ok(SUCCEEDED(hr), "Failed to create clipper, hr %#x.\n", hr);
hr = IDirectDrawClipper_SetHWnd(clipper, 0, window);
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
hr = IDirectDrawSurface_SetClipper(surface, clipper);
ok(SUCCEEDED(hr), "Failed to set surface clipper, hr %#x.\n", hr);
IDirectDrawClipper_Release(clipper);
- }
I wonder why the ddraw test is setting a clipper on the offscreen surface. It should not have an effect. Henri, do you remember why this is done?
- hr = IDirect3D2_QueryInterface(d3d2, &IID_IDirectDraw, (void**)&ddraw);
Why aren't you using the existing ddraw1 interface variable?
- primary_surface_found = FALSE;
- hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_ALL | DDENUMSURFACES_DOESEXIST,
NULL, NULL, surface_callback);
- ok(hr == DD_OK, "Failed to enumerate surfaces (hr = %x).\n", hr);
- ok(!primary_surface_found, "Primary surface shouldn't be created by CreateDeviceFromD3D.\n");
- IDirectDraw_Release(ddraw);
- hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &ds);
- ok(hr == DD_OK, "Cannot get attached depth surface (hr = %x).\n", hr);
- desc.dwSize = sizeof(desc);
- hr = IDirectDrawSurface_GetSurfaceDesc(ds, &desc);
- ok(hr == DD_OK, "Cannot get z surface desc structure (hr = %x).\n", hr);
I think here it would be interesting to confirm that the Z surface is the one created by create_device().