From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ddraw/tests/Makefile.in | 1 - dlls/ddraw/tests/d3d.c | 628 +++++++++++++++++----------------- dlls/ddraw/tests/ddraw1.c | 2 + dlls/ddraw/tests/ddraw2.c | 1 + dlls/ddraw/tests/ddraw4.c | 2 + dlls/ddraw/tests/ddraw7.c | 2 + dlls/ddraw/tests/ddrawmodes.c | 2 + dlls/ddraw/tests/dsurface.c | 2 + dlls/ddraw/tests/refcount.c | 2 + dlls/ddraw/tests/visual.c | 2 + 10 files changed, 325 insertions(+), 319 deletions(-)
diff --git a/dlls/ddraw/tests/Makefile.in b/dlls/ddraw/tests/Makefile.in index 6316bf91892..a3d0ce5cf12 100644 --- a/dlls/ddraw/tests/Makefile.in +++ b/dlls/ddraw/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ddraw.dll IMPORTS = ddraw user32 gdi32 ole32
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index d8f3618200b..87d0648b699 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -99,14 +99,14 @@ static BOOL CreateDirect3D(void)
rc = pDirectDrawCreateEx(NULL, (void**)&lpDD, &IID_IDirectDraw7, NULL); - ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", rc); + ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "Got hr %#lx.\n", rc); if (!lpDD) { - trace("DirectDrawCreateEx() failed with an error %x\n", rc); + trace("DirectDrawCreateEx() failed with an error %#lx\n", rc); return FALSE; }
rc = IDirectDraw7_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(rc==DD_OK, "SetCooperativeLevel returned: %x\n", rc); + ok(rc==DD_OK, "Got hr %#lx.\n", rc);
rc = IDirectDraw7_QueryInterface(lpDD, &IID_IDirect3D7, (void**) &lpD3D); if (rc == E_NOINTERFACE) @@ -114,7 +114,7 @@ static BOOL CreateDirect3D(void) IDirectDraw7_Release(lpDD); return FALSE; } - ok(rc==DD_OK, "QueryInterface returned: %x\n", rc); + ok(rc==DD_OK, "Got hr %#lx.\n", rc);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -145,12 +145,12 @@ static BOOL CreateDirect3D(void) ddsd.dwWidth = 256; ddsd.dwHeight = 256; rc = IDirectDraw7_CreateSurface(lpDD, &ddsd, &lpDDSdepth, NULL); - ok(rc==DD_OK, "CreateSurface returned: %x\n", rc); + ok(rc==DD_OK, "Got hr %#lx.\n", rc); if (FAILED(rc)) { lpDDSdepth = NULL; } else { rc = IDirectDrawSurface_AddAttachedSurface(lpDDS, lpDDSdepth); - ok(rc == DD_OK, "IDirectDrawSurface_AddAttachedSurface returned %x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); if (FAILED(rc)) { IDirectDrawSurface7_Release(lpDDSdepth); @@ -163,17 +163,17 @@ static BOOL CreateDirect3D(void)
rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DTnLHalDevice, lpDDS, &lpD3DDevice); - ok(rc==D3D_OK || rc==DDERR_NOPALETTEATTACHED || rc==E_OUTOFMEMORY, "CreateDevice returned: %x\n", rc); + ok(rc==D3D_OK || rc==DDERR_NOPALETTEATTACHED || rc==E_OUTOFMEMORY, "Got hr %#lx.\n", rc); if (!lpD3DDevice) { - trace("IDirect3D7::CreateDevice() for a TnL Hal device failed with an error %x, trying HAL\n", rc); + trace("IDirect3D7::CreateDevice() for a TnL Hal device failed with an error %#lx, trying HAL\n", rc); rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DHALDevice, lpDDS, &lpD3DDevice); if (!lpD3DDevice) { - trace("IDirect3D7::CreateDevice() for a HAL device failed with an error %x, trying RGB\n", rc); + trace("IDirect3D7::CreateDevice() for a HAL device failed with an error %#lx, trying RGB\n", rc); rc = IDirect3D7_CreateDevice(lpD3D, &IID_IDirect3DRGBDevice, lpDDS, &lpD3DDevice); if (!lpD3DDevice) { - trace("IDirect3D7::CreateDevice() for a RGB device failed with an error %x, giving up\n", rc); + trace("IDirect3D7::CreateDevice() for a RGB device failed with an error %#lx, giving up\n", rc); if (lpDDSdepth) IDirectDrawSurface7_Release(lpDDSdepth); IDirectDrawSurface7_Release(lpDDS); @@ -242,29 +242,29 @@ static void LightTest(void) U2(light.dvDirection).y = 1.f;
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 5, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); rc = IDirect3DDevice7_SetLight(lpD3DDevice, 10, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); rc = IDirect3DDevice7_SetLight(lpD3DDevice, 45, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
/* Try to retrieve a light beyond the indices of the lights that have been set. */ rc = IDirect3DDevice7_GetLight(lpD3DDevice, 50, &light); - ok(rc==DDERR_INVALIDPARAMS, "GetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc); rc = IDirect3DDevice7_GetLight(lpD3DDevice, 2, &light); - ok(rc==DDERR_INVALIDPARAMS, "GetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Try to retrieve one of the lights that have been set */ rc = IDirect3DDevice7_GetLight(lpD3DDevice, 10, &light); - ok(rc==D3D_OK, "GetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
/* Enable a light that have been previously set. */ rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 10, TRUE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
/* Enable some lights that have not been previously set, and verify that @@ -277,45 +277,45 @@ static void LightTest(void) U3(defaultlight.dvDirection).z = 1.f;
rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 20, TRUE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); memset(&light, 0, sizeof(D3DLIGHT7)); rc = IDirect3DDevice7_GetLight(lpD3DDevice, 20, &light); - ok(rc==D3D_OK, "GetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); ok(!memcmp(&light, &defaultlight, sizeof(D3DLIGHT7)), "light data doesn't match expected default values\n" );
rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 50, TRUE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); memset(&light, 0, sizeof(D3DLIGHT7)); rc = IDirect3DDevice7_GetLight(lpD3DDevice, 50, &light); - ok(rc==D3D_OK, "GetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); ok(!memcmp(&light, &defaultlight, sizeof(D3DLIGHT7)), "light data doesn't match expected default values\n" );
/* Disable one of the light that have been previously enabled. */ rc = IDirect3DDevice7_LightEnable(lpD3DDevice, 20, FALSE); - ok(rc==D3D_OK, "LightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
/* Try to retrieve the enable status of some lights */ /* Light 20 is supposed to be disabled */ rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 20, &bEnabled ); - ok(rc==D3D_OK, "GetLightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); ok(!bEnabled, "GetLightEnable says the light is enabled\n");
/* Light 10 is supposed to be enabled */ bEnabled = FALSE; rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 10, &bEnabled ); - ok(rc==D3D_OK, "GetLightEnable returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc); ok(bEnabled, "GetLightEnable says the light is disabled\n");
/* Light 80 has not been set */ rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 80, &bEnabled ); - ok(rc==DDERR_INVALIDPARAMS, "GetLightEnable returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Light 23 has not been set */ rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, 23, &bEnabled ); - ok(rc==DDERR_INVALIDPARAMS, "GetLightEnable returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Set some lights with invalid parameters */ memset(&light, 0, sizeof(D3DLIGHT7)); @@ -325,7 +325,7 @@ static void LightTest(void) U3(light.dcvDiffuse).b = 1.f; U3(light.dvDirection).z = 1.f; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 100, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
memset(&light, 0, sizeof(D3DLIGHT7)); light.dltType = 12345; @@ -334,10 +334,10 @@ static void LightTest(void) U3(light.dcvDiffuse).b = 1.f; U3(light.dvDirection).z = 1.f; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 101, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 102, NULL); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
memset(&light, 0, sizeof(D3DLIGHT7)); light.dltType = D3DLIGHT_SPOT; @@ -348,58 +348,58 @@ static void LightTest(void)
light.dvAttenuation0 = -one / zero; /* -INFINITY */ rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
light.dvAttenuation0 = -1.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc); + ok(rc==DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
light.dvAttenuation0 = 0.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
light.dvAttenuation0 = 1.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
light.dvAttenuation0 = one / zero; /* +INFINITY */ rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
light.dvAttenuation0 = zero / zero; /* NaN */ rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); ok(rc==D3D_OK || - broken(rc==DDERR_INVALIDPARAMS), "SetLight returned: %x\n", rc); + broken(rc==DDERR_INVALIDPARAMS), "Got hr %#lx.\n", rc);
/* Directional light ignores attenuation */ light.dltType = D3DLIGHT_DIRECTIONAL; light.dvAttenuation0 = -1.0; rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light); - ok(rc==D3D_OK, "SetLight returned: %x\n", rc); + ok(rc==D3D_OK, "Got hr %#lx.\n", rc);
memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial returned: %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc);
U4(mat).power = 129.0; rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = 129.0) returned: %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc); memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_GetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc); ok(U4(mat).power == 129, "Returned power is %f\n", U4(mat).power);
U4(mat).power = -1.0; rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = -1.0) returned: %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc); memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_GetMaterial(lpD3DDevice, &mat); - ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc); ok(U4(mat).power == -1, "Returned power is %f\n", U4(mat).power);
memset(&caps, 0, sizeof(caps)); rc = IDirect3DDevice7_GetCaps(lpD3DDevice, &caps); - ok(rc == D3D_OK, "IDirect3DDevice7_GetCaps failed with %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc);
if ( caps.dwMaxActiveLights == (DWORD) -1) { /* Some cards without T&L Support return -1 (Examples: Voodoo Banshee, RivaTNT / NV4) */ @@ -409,24 +409,24 @@ static void LightTest(void)
for(i = 1; i <= caps.dwMaxActiveLights; i++) { rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i, TRUE); - ok(rc == D3D_OK, "Enabling light %u failed with %x\n", i, rc); + ok(rc == D3D_OK, "Enabling light %u failed with %#lx\n", i, rc); rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, i, &enabled); - ok(rc == D3D_OK, "GetLightEnable on light %u failed with %x\n", i, rc); + ok(rc == D3D_OK, "GetLightEnable on light %u failed with %#lx\n", i, rc); ok(enabled, "Light %d is %s\n", i, enabled ? "enabled" : "disabled"); }
/* TODO: Test the rendering results in this situation */ rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i + 1, TRUE); - ok(rc == D3D_OK, "Enabling one light more than supported returned %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc); rc = IDirect3DDevice7_GetLightEnable(lpD3DDevice, i + 1, &enabled); - ok(rc == D3D_OK, "GetLightEnable on light %u failed with %x\n", i + 1, rc); + ok(rc == D3D_OK, "GetLightEnable on light %u failed with %#lx\n", i + 1, rc); ok(enabled, "Light %d is %s\n", i + 1, enabled ? "enabled" : "disabled"); rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i + 1, FALSE); - ok(rc == D3D_OK, "Disabling the additional returned %x\n", rc); + ok(rc == D3D_OK, "Got hr %#lx.\n", rc);
for(i = 1; i <= caps.dwMaxActiveLights; i++) { rc = IDirect3DDevice7_LightEnable(lpD3DDevice, i, FALSE); - ok(rc == D3D_OK, "Disabling light %u failed with %x\n", i, rc); + ok(rc == D3D_OK, "Disabling light %u failed with %#lx\n", i, rc); } }
@@ -436,15 +436,15 @@ static void SceneTest(void)
/* Test an EndScene without BeginScene. Should return an error */ hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "Got hr %#lx.\n", hr);
/* Test a normal BeginScene / EndScene pair, this should work */ hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); }
if (lpDDSdepth) @@ -454,17 +454,16 @@ static void SceneTest(void) fx.dwSize = sizeof(fx);
hr = IDirectDrawSurface7_Blt(lpDDSdepth, NULL, NULL, NULL, DDBLT_DEPTHFILL, &fx); - ok(hr == D3D_OK, "Depthfill failed outside a BeginScene / EndScene pair, hr 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IDirectDrawSurface7_Blt(lpDDSdepth, NULL, NULL, NULL, DDBLT_DEPTHFILL, &fx); - ok(hr == D3D_OK || broken(hr == E_FAIL), - "Depthfill failed in a BeginScene / EndScene pair, hr 0x%08x\n", hr); + ok(hr == D3D_OK || broken(hr == E_FAIL), "Got hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); } } else @@ -474,17 +473,17 @@ static void SceneTest(void)
/* Test another EndScene without having begun a new scene. Should return an error */ hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "Got hr %#lx.\n", hr);
/* Two nested BeginScene and EndScene calls */ hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginScene failed with %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); hr = IDirect3DDevice7_BeginScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_IN_SCENE, "IDirect3DDevice7_BeginScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_IN_SCENE, "Got hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(lpD3DDevice); - ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "IDirect3DDevice7_EndScene returned %08x\n", hr); + ok(hr == D3DERR_SCENE_NOT_IN_SCENE, "Got hr %#lx.\n", hr);
/* TODO: Verify that blitting works in the same way as in d3d9 */ } @@ -513,20 +512,20 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hel->dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE, "RGB Device %d hel tri caps does not have D3DPTEXTURECAPS_PERSPECTIVE set\n", ver);
- ok(hal->dcmColorModel == 0, "RGB Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel); - ok(hel->dcmColorModel == D3DCOLOR_RGB, "RGB Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel); + ok(hal->dcmColorModel == 0, "RGB Device %u hal caps has colormodel %lu\n", ver, hal->dcmColorModel); + ok(hel->dcmColorModel == D3DCOLOR_RGB, "RGB Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags == 0, "RGB Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "RGB Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags == 0, "RGB Device %u hal caps has hardware flags %#lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "RGB Device %u hel caps has hardware flags %#lx\n", ver, hel->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DHALDevice, Guid)) { trace("HAL Device %d\n", ver); - ok(hal->dcmColorModel == D3DCOLOR_RGB, "HAL Device %u hal caps has colormodel %u\n", ver, hel->dcmColorModel); - ok(hel->dcmColorModel == 0, "HAL Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel); + ok(hal->dcmColorModel == D3DCOLOR_RGB, "HAL Device %u hal caps has colormodel %lu\n", ver, hel->dcmColorModel); + ok(hel->dcmColorModel == 0, "HAL Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags != 0, "HAL Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "HAL Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags != 0, "HAL Device %u hal caps has hardware flags %#lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "HAL Device %u hel caps has hardware flags %#lx\n", ver, hel->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DRefDevice, Guid)) { @@ -568,12 +567,12 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hel->dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE, "Ramp Device %d hel tri caps does not have D3DPTEXTURECAPS_PERSPECTIVE set\n", ver);
- ok(hal->dcmColorModel == 0, "Ramp Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel); - ok(hel->dcmColorModel == D3DCOLOR_MONO, "Ramp Device %u hel caps has colormodel %u\n", + ok(hal->dcmColorModel == 0, "Ramp Device %u hal caps has colormodel %lu\n", ver, hal->dcmColorModel); + ok(hel->dcmColorModel == D3DCOLOR_MONO, "Ramp Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags == 0, "Ramp Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "Ramp Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags == 0, "Ramp Device %u hal caps has hardware flags %#lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "Ramp Device %u hel caps has hardware flags %#lx\n", ver, hel->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DMMXDevice, Guid)) { @@ -595,11 +594,11 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription, ok(hel->dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE, "MMX Device %d hel tri caps does not have D3DPTEXTURECAPS_PERSPECTIVE set\n", ver);
- ok(hal->dcmColorModel == 0, "MMX Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel); - ok(hel->dcmColorModel == D3DCOLOR_RGB, "MMX Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel); + ok(hal->dcmColorModel == 0, "MMX Device %u hal caps has colormodel %lu\n", ver, hal->dcmColorModel); + ok(hel->dcmColorModel == D3DCOLOR_RGB, "MMX Device %u hel caps has colormodel %lu\n", ver, hel->dcmColorModel);
- ok(hal->dwFlags == 0, "MMX Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags); - ok(hel->dwFlags != 0, "MMX Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags); + ok(hal->dwFlags == 0, "MMX Device %u hal caps has hardware flags %#lx\n", ver, hal->dwFlags); + ok(hel->dwFlags != 0, "MMX Device %u hel caps has hardware flags %#lx\n", ver, hel->dwFlags); } else { @@ -673,11 +672,11 @@ static void D3D7EnumTest(void) D3D7ECancelTest d3d7_cancel_test;
hr = IDirect3D7_EnumDevices(lpD3D, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", hr);
memset(&d3d7et, 0, sizeof(d3d7et)); hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, &d3d7et); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* A couple of games (Delta Force LW and TFD) rely on this behaviour */ ok(d3d7et.tnlhal < d3d7et.total, "TnLHal device enumerated as only device.\n"); @@ -691,7 +690,7 @@ static void D3D7EnumTest(void) d3d7_cancel_test.desired_ret = DDENUMRET_CANCEL; d3d7_cancel_test.total = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesCancelTest7, &d3d7_cancel_test); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
ok(d3d7_cancel_test.total == 1, "Enumerated a total of %u devices\n", d3d7_cancel_test.total); @@ -700,7 +699,7 @@ static void D3D7EnumTest(void) d3d7_cancel_test.desired_ret = E_INVALIDARG; d3d7_cancel_test.total = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesCancelTest7, &d3d7_cancel_test); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
ok(d3d7_cancel_test.total == 1, "Enumerated a total of %u devices\n", d3d7_cancel_test.total); @@ -714,7 +713,7 @@ static void D3D7EnumLifetimeTest(void)
ctx.count = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesLifetimeTest7, &ctx); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* The enumeration strings remain valid even after IDirect3D7_EnumDevices finishes. */ for (i = 0; i < ctx.count; i++) @@ -727,7 +726,7 @@ static void D3D7EnumLifetimeTest(void)
ctx2.count = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesLifetimeTest7, &ctx2); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* The enumeration strings and their order are identical across enumerations. */ ok(ctx.count == ctx2.count, "Enumerated %u and %u devices\n", ctx.count, ctx2.count); @@ -755,7 +754,7 @@ static void D3D7EnumLifetimeTest(void)
ctx2.count = 0; hr = IDirect3D7_EnumDevices(lpD3D, enumDevicesLifetimeTest7, &ctx2); - ok(hr == D3D_OK, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* The original contents of the enumeration strings are not restored. */ ok(ctx.count == ctx2.count, "Enumerated %u and %u devices\n", ctx.count, ctx2.count); @@ -784,12 +783,12 @@ static void CapsTest(void) UINT ver;
hr = DirectDrawCreate(NULL, &dd1, NULL); - ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirect3D3, (void **) &d3d3); - ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3D3_EnumDevices(d3d3, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3D3_EnumDevices returned 0x%08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", hr);
ver = 3; IDirect3D3_EnumDevices(d3d3, enumDevicesCallback, &ver); @@ -798,12 +797,12 @@ static void CapsTest(void) IDirectDraw_Release(dd1);
hr = DirectDrawCreate(NULL, &dd1, NULL); - ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirect3D2, (void **) &d3d2); - ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3D2_EnumDevices(d3d2, NULL, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3D2_EnumDevices returned 0x%08x\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", hr);
ver = 2; IDirect3D2_EnumDevices(d3d2, enumDevicesCallback, &ver); @@ -828,17 +827,17 @@ static BOOL D3D1_createObjects(void)
/* An IDirect3DDevice cannot be queryInterfaced from an IDirect3DDevice7 on windows */ hr = DirectDrawCreate(NULL, &DirectDraw1, NULL); - ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %x\n", hr); + ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "Got hr %#lx.\n", hr); if (!DirectDraw1) { return FALSE; }
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, NULL, DDSCL_NORMAL); - ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); + ok(hr==DD_OK, "Got hr %#lx.\n", hr);
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirect3D, (void**) &Direct3D1); if (hr == E_NOINTERFACE) return FALSE; - ok(hr==DD_OK, "QueryInterface returned: %x\n", hr); + ok(hr==DD_OK, "Got hr %#lx.\n", hr); if (!Direct3D1) { return FALSE; } @@ -856,7 +855,7 @@ static BOOL D3D1_createObjects(void) }
hr = IDirectDrawSurface_QueryInterface(Surface1, &IID_IDirect3DRGBDevice, (void **) &Direct3DDevice1); - ok(hr==D3D_OK || hr==DDERR_NOPALETTEATTACHED || hr==E_OUTOFMEMORY, "CreateDevice returned: %x\n", hr); + ok(hr==D3D_OK || hr==DDERR_NOPALETTEATTACHED || hr==E_OUTOFMEMORY, "Got hr %#lx.\n", hr); if(!Direct3DDevice1) { return FALSE; } @@ -868,22 +867,22 @@ static BOOL D3D1_createObjects(void) desc.dwBufferSize = 128; desc.lpData = NULL; hr = IDirect3DDevice_CreateExecuteBuffer(Direct3DDevice1, &desc, &ExecuteBuffer, NULL); - ok(hr == D3D_OK, "IDirect3DDevice_CreateExecuteBuffer failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); if(!ExecuteBuffer) { return FALSE; }
hr = IDirect3D_CreateViewport(Direct3D1, &Viewport, NULL); - ok(hr == D3D_OK, "IDirect3D_CreateViewport failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); if(!Viewport) { return FALSE; }
hr = IDirect3DViewport_Initialize(Viewport, Direct3D1); - ok(hr == DDERR_ALREADYINITIALIZED, "IDirect3DViewport_Initialize returned %08x\n", hr); + ok(hr == DDERR_ALREADYINITIALIZED, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice_AddViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "IDirect3DDevice_AddViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); vp_data.dwSize = sizeof(vp_data); vp_data.dwX = 0; vp_data.dwY = 0; @@ -896,10 +895,10 @@ static BOOL D3D1_createObjects(void) vp_data.dvMinZ = 0; vp_data.dvMaxZ = 1; hr = IDirect3DViewport_SetViewport(Viewport, &vp_data); - ok(hr == D3D_OK, "IDirect3DViewport_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3D_CreateLight(Direct3D1, &Light, NULL); - ok(hr == D3D_OK, "IDirect3D_CreateLight failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); if (!Light) return FALSE;
@@ -929,14 +928,14 @@ static void ViewportTest(void) *(DWORD*)&infinity = 0x7f800000;
hr = IDirect3DDevice_AddViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "IDirect3DDevice_AddViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DViewport_QueryInterface(Viewport, &IID_IDirect3DViewport2, (void**) &Viewport2); - ok(hr==D3D_OK, "QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "Got hr %#lx.\n", hr); ok(Viewport2 == (IDirect3DViewport2 *)Viewport, "IDirect3DViewport2 iface different from IDirect3DViewport\n");
hr = IDirect3DViewport_QueryInterface(Viewport, &IID_IDirect3DViewport3, (void**) &Viewport3); - ok(hr==D3D_OK, "QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "Got hr %#lx.\n", hr); ok(Viewport3 == (IDirect3DViewport3 *)Viewport, "IDirect3DViewport3 iface different from IDirect3DViewport\n"); IDirect3DViewport3_Release(Viewport3);
@@ -965,18 +964,18 @@ static void ViewportTest(void) vp2_data.dvMaxZ = 0.9;
hr = IDirect3DViewport2_SetViewport(Viewport2, &vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(&ret_vp1_data, 0xff, sizeof(ret_vp1_data)); ret_vp1_data.dwSize = sizeof(vp1_data);
hr = IDirect3DViewport2_GetViewport(Viewport2, &ret_vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
- ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %u, expected %u\n", ret_vp1_data.dwX, vp1_data.dwX); - ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %u, expected %u\n", ret_vp1_data.dwY, vp1_data.dwY); - ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); - ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); + ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %lu, expected %lu\n", ret_vp1_data.dwX, vp1_data.dwX); + ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %lu, expected %lu\n", ret_vp1_data.dwY, vp1_data.dwY); + ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); + ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); ok(ret_vp1_data.dvMaxX == vp1_data.dvMaxX, "dvMaxX is %f, expected %f\n", ret_vp1_data.dvMaxX, vp1_data.dvMaxX); ok(ret_vp1_data.dvMaxY == vp1_data.dvMaxY, "dvMaxY is %f, expected %f\n", ret_vp1_data.dvMaxY, vp1_data.dvMaxY); todo_wine ok(ret_vp1_data.dvScaleX == infinity, "dvScaleX is %f, expected %f\n", ret_vp1_data.dvScaleX, infinity); @@ -985,18 +984,18 @@ static void ViewportTest(void) ok(ret_vp1_data.dvMaxZ == 1.0, "dvMaxZ is %f, expected 1.0\n", ret_vp1_data.dvMaxZ);
hr = IDirect3DViewport2_SetViewport2(Viewport2, &vp2_data); - ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport2 returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(&ret_vp2_data, 0xff, sizeof(ret_vp2_data)); ret_vp2_data.dwSize = sizeof(vp2_data);
hr = IDirect3DViewport2_GetViewport2(Viewport2, &ret_vp2_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport2 returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
- ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %u, expected %u\n", ret_vp2_data.dwX, vp2_data.dwX); - ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %u, expected %u\n", ret_vp2_data.dwY, vp2_data.dwY); - ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); - ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); + ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %lu, expected %lu\n", ret_vp2_data.dwX, vp2_data.dwX); + ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %lu, expected %lu\n", ret_vp2_data.dwY, vp2_data.dwY); + ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); + ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); ok(ret_vp2_data.dvClipX == vp2_data.dvClipX, "dvClipX is %f, expected %f\n", ret_vp2_data.dvClipX, vp2_data.dvClipX); ok(ret_vp2_data.dvClipY == vp2_data.dvClipY, "dvClipY is %f, expected %f\n", ret_vp2_data.dvClipY, vp2_data.dvClipY); ok(ret_vp2_data.dvClipWidth == vp2_data.dvClipWidth, "dvClipWidth is %f, expected %f\n", @@ -1010,12 +1009,12 @@ static void ViewportTest(void) ret_vp1_data.dwSize = sizeof(vp1_data);
hr = IDirect3DViewport2_GetViewport(Viewport2, &ret_vp1_data); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
- ok(ret_vp1_data.dwX == vp2_data.dwX, "dwX is %u, expected %u.\n", ret_vp1_data.dwX, vp2_data.dwX); - ok(ret_vp1_data.dwY == vp2_data.dwY, "dwY is %u, expected %u.\n", ret_vp1_data.dwY, vp2_data.dwY); - ok(ret_vp1_data.dwWidth == vp2_data.dwWidth, "dwWidth is %u, expected %u.\n", ret_vp1_data.dwWidth, vp2_data.dwWidth); - ok(ret_vp1_data.dwHeight == vp2_data.dwHeight, "dwHeight is %u, expected %u.\n", ret_vp1_data.dwHeight, vp2_data.dwHeight); + ok(ret_vp1_data.dwX == vp2_data.dwX, "dwX is %lu, expected %lu.\n", ret_vp1_data.dwX, vp2_data.dwX); + ok(ret_vp1_data.dwY == vp2_data.dwY, "dwY is %lu, expected %lu.\n", ret_vp1_data.dwY, vp2_data.dwY); + ok(ret_vp1_data.dwWidth == vp2_data.dwWidth, "dwWidth is %lu, expected %lu.\n", ret_vp1_data.dwWidth, vp2_data.dwWidth); + ok(ret_vp1_data.dwHeight == vp2_data.dwHeight, "dwHeight is %lu, expected %lu.\n", ret_vp1_data.dwHeight, vp2_data.dwHeight); ok(ret_vp1_data.dvMaxX == vp1_data.dvMaxX, "dvMaxX is %f, expected %f.\n", ret_vp1_data.dvMaxX, vp1_data.dvMaxX); ok(ret_vp1_data.dvMaxY == vp1_data.dvMaxY, "dvMaxY is %f, expected %f.\n", ret_vp1_data.dvMaxY, vp1_data.dvMaxY); ok(ret_vp1_data.dvScaleX == infinity, "dvScaleX is %f, expected %f.\n", ret_vp1_data.dvScaleX, infinity); @@ -1024,18 +1023,18 @@ static void ViewportTest(void) ok(ret_vp1_data.dvMaxZ == 1.0, "dvMaxZ is %f, expected 1.0.\n", ret_vp1_data.dvMaxZ);
hr = IDirect3DViewport2_SetViewport2(Viewport2, &vp2_data); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
memset(&ret_vp2_data, 0xff, sizeof(ret_vp2_data)); ret_vp2_data.dwSize = sizeof(vp2_data);
hr = IDirect3DViewport2_GetViewport2(Viewport2, &ret_vp2_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport2 returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
- ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %u, expected %u\n", ret_vp2_data.dwX, vp2_data.dwX); - ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %u, expected %u\n", ret_vp2_data.dwY, vp2_data.dwY); - ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); - ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); + ok(ret_vp2_data.dwX == vp2_data.dwX, "dwX is %lu, expected %lu\n", ret_vp2_data.dwX, vp2_data.dwX); + ok(ret_vp2_data.dwY == vp2_data.dwY, "dwY is %lu, expected %lu\n", ret_vp2_data.dwY, vp2_data.dwY); + ok(ret_vp2_data.dwWidth == vp2_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp2_data.dwWidth, vp2_data.dwWidth); + ok(ret_vp2_data.dwHeight == vp2_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp2_data.dwHeight, vp2_data.dwHeight); ok(ret_vp2_data.dvClipX == vp2_data.dvClipX, "dvClipX is %f, expected %f\n", ret_vp2_data.dvClipX, vp2_data.dvClipX); ok(ret_vp2_data.dvClipY == vp2_data.dvClipY, "dvClipY is %f, expected %f\n", ret_vp2_data.dvClipY, vp2_data.dvClipY); ok(ret_vp2_data.dvClipWidth == vp2_data.dvClipWidth, "dvClipWidth is %f, expected %f\n", @@ -1046,18 +1045,18 @@ static void ViewportTest(void) ok(ret_vp2_data.dvMaxZ == vp2_data.dvMaxZ, "dvMaxZ is %f, expected %f\n", ret_vp2_data.dvMaxZ, vp2_data.dvMaxZ);
hr = IDirect3DViewport2_SetViewport(Viewport2, &vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_SetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(&ret_vp1_data, 0xff, sizeof(ret_vp1_data)); ret_vp1_data.dwSize = sizeof(vp1_data);
hr = IDirect3DViewport2_GetViewport(Viewport2, &ret_vp1_data); - ok(hr == D3D_OK, "IDirect3DViewport2_GetViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
- ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %u, expected %u\n", ret_vp1_data.dwX, vp1_data.dwX); - ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %u, expected %u\n", ret_vp1_data.dwY, vp1_data.dwY); - ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %u, expected %u\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); - ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %u, expected %u\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); + ok(ret_vp1_data.dwX == vp1_data.dwX, "dwX is %lu, expected %lu\n", ret_vp1_data.dwX, vp1_data.dwX); + ok(ret_vp1_data.dwY == vp1_data.dwY, "dwY is %lu, expected %lu\n", ret_vp1_data.dwY, vp1_data.dwY); + ok(ret_vp1_data.dwWidth == vp1_data.dwWidth, "dwWidth is %lu, expected %lu\n", ret_vp1_data.dwWidth, vp1_data.dwWidth); + ok(ret_vp1_data.dwHeight == vp1_data.dwHeight, "dwHeight is %lu, expected %lu\n", ret_vp1_data.dwHeight, vp1_data.dwHeight); ok(ret_vp1_data.dvMaxX == vp1_data.dvMaxX, "dvMaxX is %f, expected %f\n", ret_vp1_data.dvMaxX, vp1_data.dvMaxX); ok(ret_vp1_data.dvMaxY == vp1_data.dvMaxY, "dvMaxY is %f, expected %f\n", ret_vp1_data.dvMaxY, vp1_data.dvMaxY); todo_wine ok(ret_vp1_data.dvScaleX == infinity, "dvScaleX is %f, expected %f\n", ret_vp1_data.dvScaleX, infinity); @@ -1069,13 +1068,13 @@ static void ViewportTest(void) ret_vp2_data.dwSize = sizeof(vp2_data);
hr = IDirect3DViewport2_GetViewport2(Viewport2, &ret_vp2_data); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
- ok(ret_vp2_data.dwX == vp1_data.dwX, "dwX is %u, expected %u.\n", ret_vp2_data.dwX, vp1_data.dwX); - ok(ret_vp2_data.dwY == vp1_data.dwY, "dwY is %u, expected %u.\n", ret_vp2_data.dwY, vp1_data.dwY); - ok(ret_vp2_data.dwWidth == vp1_data.dwWidth, "dwWidth is %u, expected %u.\n", + ok(ret_vp2_data.dwX == vp1_data.dwX, "dwX is %lu, expected %lu.\n", ret_vp2_data.dwX, vp1_data.dwX); + ok(ret_vp2_data.dwY == vp1_data.dwY, "dwY is %lu, expected %lu.\n", ret_vp2_data.dwY, vp1_data.dwY); + ok(ret_vp2_data.dwWidth == vp1_data.dwWidth, "dwWidth is %lu, expected %lu.\n", ret_vp2_data.dwWidth, vp1_data.dwWidth); - ok(ret_vp2_data.dwHeight == vp1_data.dwHeight, "dwHeight is %u, expected %u.\n", + ok(ret_vp2_data.dwHeight == vp1_data.dwHeight, "dwHeight is %lu, expected %lu.\n", ret_vp2_data.dwHeight, vp1_data.dwHeight); todo_wine ok(ret_vp2_data.dvClipX == vp2_data.dvClipX, "dvClipX is %f, expected %f.\n", ret_vp2_data.dvClipX, vp2_data.dvClipX); @@ -1091,7 +1090,7 @@ static void ViewportTest(void) IDirect3DViewport2_Release(Viewport2);
hr = IDirect3DDevice_DeleteViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); }
static void Direct3D1Test(void) @@ -1107,14 +1106,14 @@ static void Direct3D1Test(void)
/* Interface consistency check. */ hr = IDirect3DDevice_GetDirect3D(Direct3DDevice1, &Direct3D_alt); - ok(hr == D3D_OK, "IDirect3DDevice_GetDirect3D failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(Direct3D_alt == Direct3D1, "Direct3D1 struct pointer mismatch: %p != %p\n", Direct3D_alt, Direct3D1); IDirect3D_Release(Direct3D_alt);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &desc); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(desc.lpData, 0, 128); instr = desc.lpData; @@ -1132,16 +1131,16 @@ static void Direct3D1Test(void) instr[idx].bSize = 0; instr[idx].wCount = 0; hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc);
hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &desc); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(desc.lpData, 0, 128); instr = desc.lpData; @@ -1160,17 +1159,17 @@ static void Direct3D1Test(void) instr[0].bSize = 0; instr[0].wCount = 0; hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* Test rendering 0 triangles */ memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc);
hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &desc); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(desc.lpData, 0, 128); instr = desc.lpData; @@ -1183,29 +1182,29 @@ static void Direct3D1Test(void) instr->bSize = 0; instr->wCount = 0; hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); - ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_CLIPPED); - ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice_DeleteViewport(Direct3DDevice1, Viewport); - ok(hr == D3D_OK, "IDirect3DDevice_DeleteViewport returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DViewport_AddLight(Viewport, Light); - ok(hr == D3D_OK, "IDirect3DViewport_AddLight returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); refcount = getRefcount((IUnknown*) Light); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
hr = IDirect3DViewport_NextLight(Viewport, NULL, &d3dlight, D3DNEXT_HEAD); - ok(hr == D3D_OK, "IDirect3DViewport_AddLight returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(d3dlight == Light, "Got different light returned %p, expected %p\n", d3dlight, Light); refcount = getRefcount((IUnknown*) Light); - ok(refcount == 3, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 3, "Refcount should be 2, returned is %ld\n", refcount);
hr = IDirect3DViewport_DeleteLight(Viewport, Light); - ok(hr == D3D_OK, "IDirect3DViewport_DeleteLight returned %08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); refcount = getRefcount((IUnknown*) Light); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
IDirect3DLight_Release(Light); } @@ -1248,7 +1247,7 @@ static void TextureLoadTest(void) U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 8;
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &TexSurface, NULL); - ok(hr==D3D_OK, "CreateSurface returned: %x\n", hr); + ok(hr==D3D_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreateSurface failed; skipping further tests\n"); goto cleanup; @@ -1256,14 +1255,14 @@ static void TextureLoadTest(void)
hr = IDirectDrawSurface_QueryInterface(TexSurface, &IID_IDirect3DTexture, (void *)&Texture); - ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) { skip("Can't get IDirect3DTexture interface; skipping further tests\n"); goto cleanup; }
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &TexSurface2, NULL); - ok(hr==D3D_OK, "CreateSurface returned: %x\n", hr); + ok(hr==D3D_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreateSurface failed; skipping further tests\n"); goto cleanup; @@ -1271,7 +1270,7 @@ static void TextureLoadTest(void)
hr = IDirectDrawSurface_QueryInterface(TexSurface2, &IID_IDirect3DTexture, (void *)&Texture2); - ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %x\n", hr); + ok(hr==D3D_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) { skip("Can't get IDirect3DTexture interface; skipping further tests\n"); goto cleanup; @@ -1279,11 +1278,11 @@ static void TextureLoadTest(void)
/* test load of Texture to Texture */ hr = IDirect3DTexture_Load(Texture, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
/* test Load when both textures have no palette */ hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 256; i++) { table1[i].peRed = i; @@ -1293,7 +1292,7 @@ static void TextureLoadTest(void) }
hr = IDirectDraw_CreatePalette(DirectDraw1, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table1, &palette, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreatePalette failed; skipping further tests\n"); goto cleanup; @@ -1301,9 +1300,9 @@ static void TextureLoadTest(void)
/* test Load when source texture has palette and destination has no palette */ hr = IDirectDrawSurface_SetPalette(TexSurface, palette); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DDERR_NOPALETTEATTACHED, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DDERR_NOPALETTEATTACHED, "Got hr %#lx.\n", hr);
for (i = 0; i < 256; i++) { table2[i].peRed = 255 - i; @@ -1313,7 +1312,7 @@ static void TextureLoadTest(void) }
hr = IDirectDraw_CreatePalette(DirectDraw1, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table2, &palette2, NULL); - ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) { skip("IDirectDraw_CreatePalette failed; skipping further tests\n"); goto cleanup; @@ -1321,38 +1320,38 @@ static void TextureLoadTest(void)
/* test Load when source has no palette and destination has a palette */ hr = IDirectDrawSurface_SetPalette(TexSurface, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_SetPalette(TexSurface2, palette2); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_GetPalette(TexSurface2, &palette_tmp); - ok(hr == DD_OK, "IDirectDrawSurface_GetPalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if (!palette_tmp) { skip("IDirectDrawSurface_GetPalette failed; skipping color table check\n"); goto cleanup; } else { hr = IDirectDrawPalette_GetEntries(palette_tmp, 0, 0, 256, table_tmp); - ok(hr == DD_OK, "IDirectDrawPalette_GetEntries returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); ok(colortables_check_equality(table2, table_tmp), "Unexpected palettized texture color table\n"); IDirectDrawPalette_Release(palette_tmp); }
/* test Load when both textures have palettes */ hr = IDirectDrawSurface_SetPalette(TexSurface, palette); - ok(hr == DD_OK, "IDirectDrawSurface_SetPalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirect3DTexture_Load(Texture2, Texture); - ok(hr == DD_OK, "IDirect3DTexture_Load returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_GetPalette(TexSurface2, &palette_tmp); - ok(hr == DD_OK, "IDirectDrawSurface_GetPalette returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if (!palette_tmp) { skip("IDirectDrawSurface_GetPalette failed; skipping color table check\n"); goto cleanup; } else { hr = IDirectDrawPalette_GetEntries(palette_tmp, 0, 0, 256, table_tmp); - ok(hr == DD_OK, "IDirectDrawPalette_GetEntries returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); ok(colortables_check_equality(table1, table_tmp), "Unexpected palettized texture color table\n"); IDirectDrawPalette_Release(palette_tmp); } @@ -1383,10 +1382,10 @@ static void VertexBufferDescTest(void) desc.dwFVF = D3DFVF_XYZ; desc.dwNumVertices = 1; rc = IDirect3D7_CreateVertexBuffer(lpD3D, &desc, &lpVBufSrc, 0); - ok(rc==D3D_OK || rc==E_OUTOFMEMORY, "CreateVertexBuffer returned: %x\n", rc); + ok(rc==D3D_OK || rc==E_OUTOFMEMORY, "Got hr %#lx.\n", rc); if (!lpVBufSrc) { - trace("IDirect3D7::CreateVertexBuffer() failed with an error %x\n", rc); + trace("Failed to create vertex buffer, hr %#lx.\n", rc); goto out; }
@@ -1397,9 +1396,9 @@ static void VertexBufferDescTest(void) skip("GetVertexBuffer Failed!\n"); ok( mem.desc2.dwSize == sizeof(D3DVERTEXBUFFERDESC)*2, "Size returned from GetVertexBufferDesc does not match the value put in\n" ); ok( mem.buffer[sizeof(D3DVERTEXBUFFERDESC)] == 0x12, "GetVertexBufferDesc cleared outside of the struct! (dwSize was double the size of the struct)\n"); - ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %x, expected %x\n", mem.desc2.dwCaps, desc.dwCaps); - ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %x, expected %x\n", mem.desc2.dwFVF, desc.dwFVF); - ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %x, expected %x\n", mem.desc2.dwNumVertices, desc.dwNumVertices); + ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwCaps, desc.dwCaps); + ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwFVF, desc.dwFVF); + ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwNumVertices, desc.dwNumVertices);
memset(mem.buffer, 0x12, sizeof(mem.buffer)); mem.desc2.dwSize = 0; @@ -1408,9 +1407,9 @@ static void VertexBufferDescTest(void) skip("GetVertexBuffer Failed!\n"); ok( mem.desc2.dwSize == 0, "Size returned from GetVertexBufferDesc does not match the value put in\n" ); ok( mem.buffer[sizeof(D3DVERTEXBUFFERDESC)] == 0x12, "GetVertexBufferDesc cleared outside of the struct! (dwSize was 0)\n"); - ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %x, expected %x\n", mem.desc2.dwCaps, desc.dwCaps); - ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %x, expected %x\n", mem.desc2.dwFVF, desc.dwFVF); - ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %x, expected %x\n", mem.desc2.dwNumVertices, desc.dwNumVertices); + ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwCaps, desc.dwCaps); + ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwFVF, desc.dwFVF); + ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwNumVertices, desc.dwNumVertices);
memset(mem.buffer, 0x12, sizeof(mem.buffer)); mem.desc2.dwSize = sizeof(D3DVERTEXBUFFERDESC); @@ -1419,9 +1418,9 @@ static void VertexBufferDescTest(void) skip("GetVertexBuffer Failed!\n"); ok( mem.desc2.dwSize == sizeof(D3DVERTEXBUFFERDESC), "Size returned from GetVertexBufferDesc does not match the value put in\n" ); ok( mem.buffer[sizeof(D3DVERTEXBUFFERDESC)] == 0x12, "GetVertexBufferDesc cleared outside of the struct! (dwSize was the size of the struct)\n"); - ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %x, expected %x\n", mem.desc2.dwCaps, desc.dwCaps); - ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %x, expected %x\n", mem.desc2.dwFVF, desc.dwFVF); - ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %x, expected %x\n", mem.desc2.dwNumVertices, desc.dwNumVertices); + ok( mem.desc2.dwCaps == desc.dwCaps, "dwCaps returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwCaps, desc.dwCaps); + ok( mem.desc2.dwFVF == desc.dwFVF, "dwFVF returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwFVF, desc.dwFVF); + ok (mem.desc2.dwNumVertices == desc.dwNumVertices, "dwNumVertices returned differs. Got %#lx, expected %#lx\n", mem.desc2.dwNumVertices, desc.dwNumVertices);
out: IDirect3DVertexBuffer7_Release(lpVBufSrc); @@ -1432,7 +1431,7 @@ static void SetMaterialTest(void) HRESULT rc;
rc =IDirect3DDevice7_SetMaterial(lpD3DDevice, NULL); - ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc); }
static void SetRenderTargetTest(void) @@ -1452,7 +1451,7 @@ static void SetRenderTargetTest(void) ddsd.dwHeight = 64;
hr = IDirectDraw7_CreateSurface(lpDD, &ddsd, &newrt, NULL); - ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if(FAILED(hr)) { skip("Skipping SetRenderTarget test\n"); @@ -1471,7 +1470,7 @@ static void SetRenderTargetTest(void) U3(U4(ddsd2).ddpfPixelFormat).dwZBitMask = 0x0000FFFF;
hr = IDirectDraw7_CreateSurface(lpDD, &ddsd2, &failrt, NULL); - ok(hr == DD_OK, "IDirectDraw7_CreateSurface failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
memset(&vp, 0, sizeof(vp)); vp.dwX = 10; @@ -1481,46 +1480,46 @@ static void SetRenderTargetTest(void) vp.dvMinZ = 0.25; vp.dvMaxZ = 0.75; hr = IDirect3DDevice7_SetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice7_GetRenderTarget(lpD3DDevice, &oldrt); - ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
refcount = getRefcount((IUnknown*) oldrt); - ok(refcount == 3, "Refcount should be 3, returned is %d\n", refcount); + ok(refcount == 3, "Refcount should be 3, returned is %ld\n", refcount);
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 1, "Refcount should be 1, returned is %d\n", refcount); + ok(refcount == 1, "Refcount should be 1, returned is %ld\n", refcount);
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, failrt, 0); ok(hr != D3D_OK, "IDirect3DDevice7_SetRenderTarget succeeded\n");
refcount = getRefcount((IUnknown*) oldrt); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
hr = IDirect3DDevice7_GetRenderTarget(lpD3DDevice, &temprt); - ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); ok(failrt == temprt, "Wrong iface returned\n");
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 3, "Refcount should be 3, returned is %d\n", refcount); + ok(refcount == 3, "Refcount should be 3, returned is %ld\n", refcount);
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, newrt, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
refcount = getRefcount((IUnknown*) failrt); - ok(refcount == 2, "Refcount should be 2, returned is %d\n", refcount); + ok(refcount == 2, "Refcount should be 2, returned is %ld\n", refcount);
memset(&vp, 0xff, sizeof(vp)); hr = IDirect3DDevice7_GetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08x\n", hr); - ok(vp.dwX == 10, "vp.dwX is %u, expected 10\n", vp.dwX); - ok(vp.dwY == 10, "vp.dwY is %u, expected 10\n", vp.dwY); - ok(vp.dwWidth == 246, "vp.dwWidth is %u, expected 246\n", vp.dwWidth); - ok(vp.dwHeight == 246, "vp.dwHeight is %u, expected 246\n", vp.dwHeight); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); + ok(vp.dwX == 10, "vp.dwX is %lu, expected 10\n", vp.dwX); + ok(vp.dwY == 10, "vp.dwY is %lu, expected 10\n", vp.dwY); + ok(vp.dwWidth == 246, "vp.dwWidth is %lu, expected 246\n", vp.dwWidth); + ok(vp.dwHeight == 246, "vp.dwHeight is %lu, expected 246\n", vp.dwHeight); ok(vp.dvMinZ == 0.25, "vp.dvMinZ is %f, expected 0.25\n", vp.dvMinZ); ok(vp.dvMaxZ == 0.75, "vp.dvMaxZ is %f, expected 0.75\n", vp.dvMaxZ);
@@ -1532,39 +1531,39 @@ static void SetRenderTargetTest(void) vp.dvMinZ = 0.0; vp.dvMaxZ = 1.0; hr = IDirect3DDevice7_SetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice7_BeginStateBlock(lpD3DDevice); - ok(hr == D3D_OK, "IDirect3DDevice7_BeginStateblock failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, oldrt, 0); - ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* Check this twice, before and after ending the stateblock */ memset(&vp, 0xff, sizeof(vp)); hr = IDirect3DDevice7_GetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08x\n", hr); - ok(vp.dwX == 0, "vp.dwX is %u, expected 0\n", vp.dwX); - ok(vp.dwY == 0, "vp.dwY is %u, expected 0\n", vp.dwY); - ok(vp.dwWidth == 64, "vp.dwWidth is %u, expected 64\n", vp.dwWidth); - ok(vp.dwHeight == 64, "vp.dwHeight is %u, expected 64\n", vp.dwHeight); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); + ok(vp.dwX == 0, "vp.dwX is %lu, expected 0\n", vp.dwX); + ok(vp.dwY == 0, "vp.dwY is %lu, expected 0\n", vp.dwY); + ok(vp.dwWidth == 64, "vp.dwWidth is %lu, expected 64\n", vp.dwWidth); + ok(vp.dwHeight == 64, "vp.dwHeight is %lu, expected 64\n", vp.dwHeight); ok(vp.dvMinZ == 0.0, "vp.dvMinZ is %f, expected 0.0\n", vp.dvMinZ); ok(vp.dvMaxZ == 1.0, "vp.dvMaxZ is %f, expected 1.0\n", vp.dvMaxZ);
hr = IDirect3DDevice7_EndStateBlock(lpD3DDevice, &stateblock); - ok(hr == D3D_OK, "IDirect3DDevice7_EndStateblock failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(&vp, 0xff, sizeof(vp)); hr = IDirect3DDevice7_GetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_GetViewport failed, hr=0x%08x\n", hr); - ok(vp.dwX == 0, "vp.dwX is %u, expected 0\n", vp.dwX); - ok(vp.dwY == 0, "vp.dwY is %u, expected 0\n", vp.dwY); - ok(vp.dwWidth == 64, "vp.dwWidth is %u, expected 64\n", vp.dwWidth); - ok(vp.dwHeight == 64, "vp.dwHeight is %u, expected 64\n", vp.dwHeight); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); + ok(vp.dwX == 0, "vp.dwX is %lu, expected 0\n", vp.dwX); + ok(vp.dwY == 0, "vp.dwY is %lu, expected 0\n", vp.dwY); + ok(vp.dwWidth == 64, "vp.dwWidth is %lu, expected 64\n", vp.dwWidth); + ok(vp.dwHeight == 64, "vp.dwHeight is %lu, expected 64\n", vp.dwHeight); ok(vp.dvMinZ == 0.0, "vp.dvMinZ is %f, expected 0.0\n", vp.dvMinZ); ok(vp.dvMaxZ == 1.0, "vp.dvMaxZ is %f, expected 1.0\n", vp.dvMaxZ);
hr = IDirect3DDevice7_DeleteStateBlock(lpD3DDevice, stateblock); - ok(hr == D3D_OK, "IDirect3DDevice7_DeleteStateblock failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
memset(&vp, 0, sizeof(vp)); vp.dwX = 0; @@ -1574,7 +1573,7 @@ static void SetRenderTargetTest(void) vp.dvMinZ = 0.0; vp.dvMaxZ = 0.0; hr = IDirect3DDevice7_SetViewport(lpD3DDevice, &vp); - ok(hr == D3D_OK, "IDirect3DDevice7_SetViewport failed, hr=0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
IDirectDrawSurface7_Release(oldrt); IDirectDrawSurface7_Release(newrt); @@ -1617,18 +1616,18 @@ static void VertexBufferLockRest(void) desc.dwFVF = D3DFVF_XYZ; desc.dwNumVertices = 64; hr = IDirect3D7_CreateVertexBuffer(lpD3D, &desc, &buffer, 0); - ok(hr == D3D_OK, "IDirect3D7_CreateVertexBuffer failed, 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
for(i = 0; i < (sizeof(test_data) / sizeof(*test_data)); i++) { hr = IDirect3DVertexBuffer7_Lock(buffer, test_data[i].flags, &data, NULL); - ok(hr == test_data[i].result, "Lock flags %s returned 0x%08x, expected 0x%08x\n", + ok(hr == test_data[i].result, "Lock flags %s returned %#lx, expected %#lx\n", test_data[i].debug_string, hr, test_data[i].result); if(SUCCEEDED(hr)) { ok(data != NULL, "The data pointer returned by Lock is NULL\n"); hr = IDirect3DVertexBuffer7_Unlock(buffer); - ok(hr == D3D_OK, "IDirect3DVertexBuffer7_Unlock failed, 0x%08x\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); } }
@@ -1656,7 +1655,7 @@ static void BackBuffer3DCreateSurfaceTest(void) memset(&ddcaps, 0, sizeof(ddcaps)); ddcaps.dwSize = sizeof(DDCAPS); hr = IDirectDraw_GetCaps(DirectDraw1, &ddcaps, NULL); - ok(SUCCEEDED(hr), "DirectDraw_GetCaps failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); if (!(ddcaps.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) { skip("DDraw reported no VIDEOMEMORY cap. Broken video driver? Skipping surface caps tests.\n"); @@ -1679,20 +1678,19 @@ static void BackBuffer3DCreateSurfaceTest(void) created_ddsd.dwSize = sizeof(DDSURFACEDESC);
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surf, NULL); - ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); if (surf != NULL) { hr = IDirectDrawSurface_GetSurfaceDesc(surf, &created_ddsd); - ok(SUCCEEDED(hr), "IDirectDraw_GetSurfaceDesc failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); ok(created_ddsd.ddsCaps.dwCaps == expected_caps, - "GetSurfaceDesc returned caps %x, expected %x\n", created_ddsd.ddsCaps.dwCaps, - expected_caps); + "GetSurfaceDesc returned caps %#lx.\n", created_ddsd.ddsCaps.dwCaps);
hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DHALDevice, (void **)&d3dhal); /* Currently Wine only supports the creation of one Direct3D device for a given DirectDraw instance. It has been created already in D3D1_createObjects() - IID_IDirect3DRGBDevice */ - todo_wine ok(SUCCEEDED(hr), "Expected IDirectDrawSurface::QueryInterface to succeed, got 0x%08x\n", hr); + todo_wine ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
if (SUCCEEDED(hr)) IDirect3DDevice_Release(d3dhal); @@ -1701,29 +1699,26 @@ static void BackBuffer3DCreateSurfaceTest(void) }
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw2, (void **) &dd2); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
hr = IDirectDraw2_CreateSurface(dd2, &ddsd, &surf, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw2_CreateSurface didn't return %x08x, but %x08x\n", - DDERR_INVALIDCAPS, hr); + ok(hr == DDERR_INVALIDCAPS, "Got hr %#lx.\n", hr);
IDirectDraw2_Release(dd2);
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw4, (void **) &dd4); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
hr = IDirectDraw4_CreateSurface(dd4, &ddsd2, &surf4, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw4_CreateSurface didn't return %x08x, but %x08x\n", - DDERR_INVALIDCAPS, hr); + ok(hr == DDERR_INVALIDCAPS, "Got hr %#lx.\n", hr);
IDirectDraw4_Release(dd4);
hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirectDraw7, (void **) &dd7); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
hr = IDirectDraw7_CreateSurface(dd7, &ddsd2, &surf7, NULL); - ok(hr == DDERR_INVALIDCAPS, "IDirectDraw7_CreateSurface didn't return %x08x, but %x08x\n", - DDERR_INVALIDCAPS, hr); + ok(hr == DDERR_INVALIDCAPS, "Got hr %#lx.\n", hr);
IDirectDraw7_Release(dd7); } @@ -1737,7 +1732,7 @@ static void BackBuffer3DAttachmentTest(void) 100, 100, 160, 160, NULL, NULL, NULL, NULL);
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
/* Perform attachment tests on a back-buffer */ memset(&ddsd, 0, sizeof(ddsd)); @@ -1747,7 +1742,7 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwWidth = GetSystemMetrics(SM_CXSCREEN); ddsd.dwHeight = GetSystemMetrics(SM_CYSCREEN); hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface2, NULL); - ok(SUCCEEDED(hr), "CreateSurface returned: %x\n",hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
if (surface2 != NULL) { @@ -1757,7 +1752,7 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface1, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -1766,7 +1761,7 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwWidth = GetSystemMetrics(SM_CXSCREEN); ddsd.dwHeight = GetSystemMetrics(SM_CYSCREEN); hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface3, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
/* This one has a different size */ memset(&ddsd, 0, sizeof(ddsd)); @@ -1776,43 +1771,40 @@ static void BackBuffer3DAttachmentTest(void) ddsd.dwWidth = 128; ddsd.dwHeight = 128; hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &surface4, NULL); - ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); - todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to a front buffer returned %08x\n", hr); + todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), "Got hr %#lx.\n", hr); if(SUCCEEDED(hr)) { /* Try the reverse without detaching first */ hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - ok(hr == DDERR_SURFACEALREADYATTACHED, "Attaching an attached surface to its attachee returned %08x\n", hr); + ok(hr == DDERR_SURFACEALREADYATTACHED, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface1); - todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a front buffer to a back buffer returned %08x\n", hr); + todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), "Got hr %#lx.\n", hr); if(SUCCEEDED(hr)) { /* Try to detach reversed */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); - ok(hr == DDERR_CANNOTDETACHSURFACE, "DeleteAttachedSurface returned %08x\n", hr); + ok(hr == DDERR_CANNOTDETACHSURFACE, "Got hr %#lx.\n", hr); /* Now the proper detach */ hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface1); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface2, surface3); - todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), - "Attaching a back buffer to another back buffer returned %08x\n", hr); + todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE), "Got hr %#lx.\n", hr); if(SUCCEEDED(hr)) { hr = IDirectDrawSurface_DeleteAttachedSurface(surface2, 0, surface3); - ok(hr == DD_OK, "DeleteAttachedSurface failed with %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); } hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface4); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a back buffer to a front buffer of different size returned %08x\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got hr %#lx.\n", hr); hr = IDirectDrawSurface_AddAttachedSurface(surface4, surface1); - ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a front buffer to a back buffer of different size returned %08x\n", hr); + ok(hr == DDERR_CANNOTATTACHSURFACE, "Got hr %#lx.\n", hr);
IDirectDrawSurface_Release(surface4); IDirectDrawSurface_Release(surface3); @@ -1821,16 +1813,16 @@ static void BackBuffer3DAttachmentTest(void) }
hr =IDirectDraw_SetCooperativeLevel(DirectDraw1, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
DestroyWindow(window); }
static void dump_format(const DDPIXELFORMAT *fmt) { - trace("dwFlags %08x, FourCC %08x, dwZBufferBitDepth %u, stencil %08x\n", fmt->dwFlags, fmt->dwFourCC, + trace("dwFlags %08lx, FourCC %08lx, dwZBufferBitDepth %lu, stencil %08lx\n", fmt->dwFlags, fmt->dwFourCC, U1(*fmt).dwZBufferBitDepth, U2(*fmt).dwStencilBitDepth); - trace("dwZBitMask %08x, dwStencilBitMask %08x, dwRGBZBitMask %08x\n", U3(*fmt).dwZBitMask, + trace("dwZBitMask %08lx, dwStencilBitMask %08lx, dwRGBZBitMask %08lx\n", U3(*fmt).dwZBitMask, U4(*fmt).dwStencilBitMask, U5(*fmt).dwRGBZBitMask); }
@@ -1881,11 +1873,11 @@ static HRESULT WINAPI enum_z_fmt_cb(DDPIXELFORMAT *fmt, void *ctx) ddsd.dwWidth = 1024; ddsd.dwHeight = 1024; hr = IDirectDraw7_CreateSurface(lpDD, &ddsd, &surface, NULL); - ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed, hr %#lx.\n", hr); memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &ddsd); - ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc failed, hr %#lx.\n", hr); IDirectDrawSurface7_Release(surface);
ok(ddsd.dwFlags & DDSD_PIXELFORMAT, "DDSD_PIXELFORMAT is not set\n"); @@ -1903,7 +1895,7 @@ static HRESULT WINAPI enum_z_fmt_cb(DDPIXELFORMAT *fmt, void *ctx) if (U1(ddsd).lPitch != 0 && U1(ddsd).lPitch != expected_pitch && !broken(U1(ddsd).lPitch == expected_pitch + 128)) { - ok(0, "Z buffer pitch is %u, expected %u\n", U1(ddsd).lPitch, expected_pitch); + ok(0, "Z buffer pitch is %lu, expected %u\n", U1(ddsd).lPitch, expected_pitch); dump_format(fmt); }
@@ -1930,7 +1922,7 @@ static void z_format_test(void) return; }
- ok(SUCCEEDED(hr), "IDirect3D7_EnumZBufferFormats failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "IDirect3D7_EnumZBufferFormats failed, hr %#lx.\n", hr); ok(count, "Expected at least one supported Z Buffer format\n"); }
@@ -1949,17 +1941,17 @@ static void test_get_caps1(void)
/* NULL pointers */ hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, NULL); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); hr = IDirect3DDevice_GetCaps(Direct3DDevice1, NULL, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
/* Successful call: Both are modified */ hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with correct size returned hr %#x, expected D3D_OK.\n", hr); - ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#x.\n", hel_caps.dwFlags); + ok(hr == D3D_OK, "GetCaps with correct size returned hr %#lx, expected D3D_OK.\n", hr); + ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#lx.\n", hel_caps.dwFlags);
memset(&hw_caps, 0, sizeof(hw_caps)); hw_caps.dwSize = sizeof(hw_caps); @@ -1970,15 +1962,15 @@ static void test_get_caps1(void)
/* If one is invalid the call fails */ hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags); hel_caps.dwSize = sizeof(hel_caps); hw_caps.dwSize = sizeof(hw_caps) + 1; hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
for (i = 0; i < 1024; i++) { @@ -1990,24 +1982,24 @@ static void test_get_caps1(void) { /* D3DDEVICEDESCSIZE in old sdk versions */ case FIELD_OFFSET(D3DDEVICEDESC, dwMinTextureWidth): /* 172, DirectX 3, IDirect3DDevice1 */ - ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "hw_caps.dwMinTextureWidth was modified: %#x.\n", + ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "hw_caps.dwMinTextureWidth was modified: %#lx.\n", hw_caps.dwMinTextureWidth); - ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "hel_caps.dwMinTextureWidth was modified: %#x.\n", + ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "hel_caps.dwMinTextureWidth was modified: %#lx.\n", hel_caps.dwMinTextureWidth); /* drop through */ case FIELD_OFFSET(D3DDEVICEDESC, dwMaxTextureRepeat): /* 204, DirectX 5, IDirect3DDevice2 */ - ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "hw_caps.dwMaxTextureRepeat was modified: %#x.\n", + ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "hw_caps.dwMaxTextureRepeat was modified: %#lx.\n", hw_caps.dwMaxTextureRepeat); - ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "hel_caps.dwMaxTextureRepeat was modified: %#x.\n", + ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "hel_caps.dwMaxTextureRepeat was modified: %#lx.\n", hel_caps.dwMaxTextureRepeat); /* drop through */ case sizeof(D3DDEVICEDESC): /* 252, DirectX 6, IDirect3DDevice3 */ - ok(hr == D3D_OK, "GetCaps with size %u returned hr %#x, expected D3D_OK.\n", i, hr); + ok(hr == D3D_OK, "GetCaps with size %u returned hr %#lx, expected D3D_OK.\n", i, hr); break;
default: ok(hr == DDERR_INVALIDPARAMS, - "GetCaps with size %u returned hr %#x, expected DDERR_INVALIDPARAMS.\n", i, hr); + "GetCaps with size %u returned hr %#lx, expected DDERR_INVALIDPARAMS.\n", i, hr); break; } } @@ -2016,7 +2008,7 @@ static void test_get_caps1(void) hw_caps.dwSize = 172; hel_caps.dwSize = sizeof(D3DDEVICEDESC); hr = IDirect3DDevice_GetCaps(Direct3DDevice1, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#x, expected D3D_OK.\n", hr); + ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#lx, expected D3D_OK.\n", hr); }
static void test_get_caps7(void) @@ -2025,11 +2017,11 @@ static void test_get_caps7(void) D3DDEVICEDESC7 desc;
hr = IDirect3DDevice7_GetCaps(lpD3DDevice, NULL); - ok(hr == DDERR_INVALIDPARAMS, "IDirect3DDevice7::GetCaps(NULL) returned hr %#x, expected INVALIDPARAMS.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3DDevice7::GetCaps(NULL) returned hr %#lx, expected INVALIDPARAMS.\n", hr);
memset(&desc, 0, sizeof(desc)); hr = IDirect3DDevice7_GetCaps(lpD3DDevice, &desc); - ok(hr == D3D_OK, "IDirect3DDevice7::GetCaps(non-NULL) returned hr %#x, expected D3D_OK.\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice7::GetCaps(non-NULL) returned hr %#lx, expected D3D_OK.\n", hr);
/* There's no dwSize in D3DDEVICEDESC7 */ } @@ -2051,29 +2043,29 @@ static void d3d2_release_objects(struct d3d2_test_context *context) if (context->viewport) { hr = IDirect3DDevice2_DeleteViewport(context->device, context->viewport); - ok(hr == D3D_OK, "DeleteViewport returned %08x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ref = IDirect3DViewport2_Release(context->viewport); - ok(ref == 0, "Viewport has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Unexpected refcount %ld.\n", ref); } if (context->device) { ref = IDirect3DDevice2_Release(context->device); - ok(ref == 0, "Device has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Unexpected refcount %ld.\n", ref); } if (context->surface) { ref = IDirectDrawSurface_Release(context->surface); - ok(ref == 0, "Surface has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Unexpected refcount %ld.\n", ref); } if (context->d3d) { ref = IDirect3D2_Release(context->d3d); - ok(ref == 1, "IDirect3D2 has reference count %d, expected 1.\n", ref); + ok(ref == 1, "Unexpected refcount %ld.\n", ref); } if (context->ddraw) { ref = IDirectDraw_Release(context->ddraw); - ok(ref == 0, "DDraw has reference count %d, expected 0.\n", ref); + ok(ref == 0, "Unexpected refcount %ld.\n", ref); } }
@@ -2086,15 +2078,15 @@ static BOOL d3d2_create_objects(struct d3d2_test_context *context) memset(context, 0, sizeof(*context));
hr = DirectDrawCreate(NULL, &context->ddraw, NULL); - ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate failed: %08x.\n", hr); + ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWSUPPORT, "Got hr %#lx.\n", hr); if (!context->ddraw) goto error;
hr = IDirectDraw_SetCooperativeLevel(context->ddraw, NULL, DDSCL_NORMAL); - ok(hr == DD_OK, "SetCooperativeLevel failed: %08x.\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if (FAILED(hr)) goto error;
hr = IDirectDraw_QueryInterface(context->ddraw, &IID_IDirect3D2, (void**) &context->d3d); - ok(hr == DD_OK || hr == E_NOINTERFACE, "QueryInterface failed: %08x.\n", hr); + ok(hr == DD_OK || hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); if (!context->d3d) goto error;
memset(&ddsd, 0, sizeof(ddsd)); @@ -2111,15 +2103,15 @@ static BOOL d3d2_create_objects(struct d3d2_test_context *context) }
hr = IDirect3D2_CreateDevice(context->d3d, &IID_IDirect3DHALDevice, context->surface, &context->device); - ok(hr == D3D_OK || hr == E_OUTOFMEMORY || hr == E_NOINTERFACE, "CreateDevice failed: %08x.\n", hr); + ok(hr == D3D_OK || hr == E_OUTOFMEMORY || hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); if (!context->device) goto error;
hr = IDirect3D2_CreateViewport(context->d3d, &context->viewport, NULL); - ok(hr == D3D_OK, "CreateViewport failed: %08x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); if (!context->viewport) goto error;
hr = IDirect3DDevice2_AddViewport(context->device, context->viewport); - ok(hr == D3D_OK, "AddViewport returned %08x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); vp_data.dwSize = sizeof(vp_data); vp_data.dwX = 0; vp_data.dwY = 0; @@ -2132,7 +2124,7 @@ static BOOL d3d2_create_objects(struct d3d2_test_context *context) vp_data.dvMinZ = 0; vp_data.dvMaxZ = 1; hr = IDirect3DViewport2_SetViewport(context->viewport, &vp_data); - ok(hr == D3D_OK, "SetViewport returned %08x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
return TRUE;
@@ -2156,17 +2148,17 @@ static void test_get_caps2(const struct d3d2_test_context *context)
/* NULL pointers */ hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, NULL); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hel caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); hr = IDirect3DDevice2_GetCaps(context->device, NULL, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with NULL hw caps returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
/* Successful call: Both are modified */ hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with correct size returned hr %#x, expected D3D_OK.\n", hr); - ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#x.\n", hel_caps.dwFlags); + ok(hr == D3D_OK, "GetCaps with correct size returned hr %#lx, expected D3D_OK.\n", hr); + ok(hw_caps.dwFlags != 0xdeadbeef, "hw_caps.dwFlags was not modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags != 0xdeadc0de, "hel_caps.dwFlags was not modified: %#lx.\n", hel_caps.dwFlags);
memset(&hw_caps, 0, sizeof(hw_caps)); hw_caps.dwSize = sizeof(hw_caps); @@ -2177,15 +2169,15 @@ static void test_get_caps2(const struct d3d2_test_context *context)
/* If one is invalid the call fails */ hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hel_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags); hel_caps.dwSize = sizeof(hel_caps); hw_caps.dwSize = sizeof(hw_caps) + 1; hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#x, expected INVALIDPARAMS.\n", hr); - ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#x.\n", hw_caps.dwFlags); - ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#x.\n", hel_caps.dwFlags); + ok(hr == DDERR_INVALIDPARAMS, "GetCaps with invalid hw_caps size returned hr %#lx, expected INVALIDPARAMS.\n", hr); + ok(hw_caps.dwFlags == 0xdeadbeef, "hw_caps.dwFlags was modified: %#lx.\n", hw_caps.dwFlags); + ok(hel_caps.dwFlags == 0xdeadc0de, "hel_caps.dwFlags was modified: %#lx.\n", hel_caps.dwFlags);
for (i = 0; i < 1024; i++) { @@ -2197,24 +2189,24 @@ static void test_get_caps2(const struct d3d2_test_context *context) { /* D3DDEVICEDESCSIZE in old sdk versions */ case FIELD_OFFSET(D3DDEVICEDESC, dwMinTextureWidth): /* 172, DirectX 3, IDirect3DDevice1 */ - ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#x.\n", + ok(hw_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#lx.\n", hw_caps.dwMinTextureWidth); - ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#x.\n", + ok(hel_caps.dwMinTextureWidth == 0xfefefefe, "dwMinTextureWidth was modified: %#lx.\n", hel_caps.dwMinTextureWidth); /* drop through */ case FIELD_OFFSET(D3DDEVICEDESC, dwMaxTextureRepeat): /* 204, DirectX 5, IDirect3DDevice2 */ - ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#x.\n", + ok(hw_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#lx.\n", hw_caps.dwMaxTextureRepeat); - ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#x.\n", + ok(hel_caps.dwMaxTextureRepeat == 0xfefefefe, "dwMaxTextureRepeat was modified: %#lx.\n", hel_caps.dwMaxTextureRepeat); /* drop through */ case sizeof(D3DDEVICEDESC): /* 252, DirectX 6, IDirect3DDevice3 */ - ok(hr == D3D_OK, "GetCaps with size %u returned hr %#x, expected D3D_OK.\n", i, hr); + ok(hr == D3D_OK, "GetCaps with size %u returned hr %#lx, expected D3D_OK.\n", i, hr); break;
default: ok(hr == DDERR_INVALIDPARAMS, - "GetCaps with size %u returned hr %#x, expected DDERR_INVALIDPARAMS.\n", i, hr); + "GetCaps with size %u returned hr %#lx, expected DDERR_INVALIDPARAMS.\n", i, hr); break; } } @@ -2223,7 +2215,7 @@ static void test_get_caps2(const struct d3d2_test_context *context) hw_caps.dwSize = 172; hel_caps.dwSize = sizeof(D3DDEVICEDESC); hr = IDirect3DDevice2_GetCaps(context->device, &hw_caps, &hel_caps); - ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#x, expected D3D_OK.\n", hr); + ok(hr == D3D_OK, "GetCaps with different sizes returned hr %#lx, expected D3D_OK.\n", hr); }
START_TEST(d3d) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index b87b7903289..32fd010ab95 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#define WINE_NO_LONG_TYPES #define COBJMACROS
#include "wine/test.h" diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index eea87f4bac2..0696a623bb0 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#define WINE_NO_LONG_TYPES #include <math.h>
#define COBJMACROS diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 136cf90fa60..a3352b8da3c 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#define WINE_NO_LONG_TYPES #define COBJMACROS
#include "wine/test.h" diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 711eac2a6d6..8d1da1335fa 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#define WINE_NO_LONG_TYPES #define COBJMACROS
#include "wine/test.h" diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c index 638ff374012..6de3691f77b 100644 --- a/dlls/ddraw/tests/ddrawmodes.c +++ b/dlls/ddraw/tests/ddrawmodes.c @@ -25,6 +25,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#define WINE_NO_LONG_TYPES + #include <assert.h> #include "wine/test.h" #include "ddraw.h" diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 59902b43761..2c722fa03c4 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -21,6 +21,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#define WINE_NO_LONG_TYPES #define COBJMACROS
#include "wine/test.h" diff --git a/dlls/ddraw/tests/refcount.c b/dlls/ddraw/tests/refcount.c index 07673ab66e9..346a55e9d23 100644 --- a/dlls/ddraw/tests/refcount.c +++ b/dlls/ddraw/tests/refcount.c @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#define WINE_NO_LONG_TYPES #define COBJMACROS
#include "wine/test.h" diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c index 4d6b198e323..9d81ade34b5 100644 --- a/dlls/ddraw/tests/visual.c +++ b/dlls/ddraw/tests/visual.c @@ -19,6 +19,8 @@
/* See comment in dlls/d3d9/tests/visual.c for general guidelines */
+#define WINE_NO_LONG_TYPES + #include "wine/test.h" #include "ddraw.h" #include "d3d.h"
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ddraw/tests/ddrawmodes.c | 186 +++++++++++++++++----------------- 1 file changed, 92 insertions(+), 94 deletions(-)
diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c index 6de3691f77b..da92361a5b4 100644 --- a/dlls/ddraw/tests/ddrawmodes.c +++ b/dlls/ddraw/tests/ddrawmodes.c @@ -25,8 +25,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#define WINE_NO_LONG_TYPES - #include <assert.h> #include "wine/test.h" #include "ddraw.h" @@ -83,9 +81,9 @@ static BOOL createdirectdraw(void) SetRect(&rect_before_create, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
rc = DirectDrawCreate(NULL, &lpDD, NULL); - ok(rc==DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", rc); + ok(rc == DD_OK || rc==DDERR_NODIRECTDRAWSUPPORT, "Got hr %#lx.\n", rc); if (!lpDD) { - trace("DirectDrawCreateEx() failed with an error %x\n", rc); + trace("DirectDrawCreateEx() failed with an error %#lx\n", rc); return FALSE; } return TRUE; @@ -140,17 +138,17 @@ static void test_DirectDrawEnumerateA(void)
/* Test with NULL callback parameter. */ ret = pDirectDrawEnumerateA(NULL, NULL); - ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ trace("Calling DirectDrawEnumerateA with test_nullcontext_callbackA callback and NULL context.\n"); ret = pDirectDrawEnumerateA(test_nullcontext_callbackA, NULL); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and valid context parameter. */ trace("Calling DirectDrawEnumerateA with test_context_callbackA callback and non-NULL context.\n"); ret = pDirectDrawEnumerateA(test_context_callbackA, (void *)0xdeadbeef); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Got hr %#lx.\n", ret); }
static BOOL WINAPI test_callbackW(GUID *lpGUID, WCHAR *lpDriverDescription, @@ -176,17 +174,17 @@ static void test_DirectDrawEnumerateW(void) ret = pDirectDrawEnumerateW(NULL, NULL); ok(ret == DDERR_INVALIDPARAMS || ret == DDERR_UNSUPPORTED, /* Older ddraw */ - "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %d\n", ret); + "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %#lx\n", ret);
/* Test with invalid callback parameter. */ ret = pDirectDrawEnumerateW((LPDDENUMCALLBACKW)0xdeadbeef, NULL); ok(ret == DDERR_INVALIDPARAMS /* XP */ || ret == DDERR_UNSUPPORTED /* Win7 */, - "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %d\n", ret); + "Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %#lx\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ ret = pDirectDrawEnumerateW(test_callbackW, NULL); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %#lx\n", ret); }
static BOOL WINAPI test_nullcontext_callbackExA(GUID *lpGUID, char *lpDriverDescription, @@ -237,36 +235,36 @@ static void test_DirectDrawEnumerateExA(void)
/* Test with NULL callback parameter. */ ret = pDirectDrawEnumerateExA(NULL, NULL, 0); - ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and invalid flags */ ret = pDirectDrawEnumerateExA(test_nullcontext_callbackExA, NULL, ~0); - ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret); + ok(ret == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ trace("Calling DirectDrawEnumerateExA with empty flags and NULL context.\n"); ret = pDirectDrawEnumerateExA(test_nullcontext_callbackExA, NULL, 0); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and non-NULL context parameter. */ trace("Calling DirectDrawEnumerateExA with empty flags and non-NULL context.\n"); ret = pDirectDrawEnumerateExA(test_context_callbackExA, (void *)0xdeadbeef, 0); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and count the number of primary devices */ callbackCount = 0; ret = pDirectDrawEnumerateExA(test_count_callbackExA, &callbackCount, 0); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); - ok(callbackCount == 1, "Expected 1 primary device, got %d\n", callbackCount); + ok(ret == DD_OK, "Got hr %#lx.\n", ret); + ok(callbackCount == 1, "Expected 1 primary device, got %lu\n", callbackCount);
/* Test with valid callback parameter and count the number of secondary devices */ callbackCount = 0; ret = pDirectDrawEnumerateExA(test_count_callbackExA, &callbackCount, DDENUM_ATTACHEDSECONDARYDEVICES); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Got hr %#lx.\n", ret); /* Note: this list includes the primary devices as well and some systems (such as the TestBot) do not include any secondary devices */ - ok(callbackCount >= 1, "Expected at least one device, got %d\n", callbackCount); + ok(callbackCount >= 1, "Expected at least one device, got %lu\n", callbackCount);
/* Test with valid callback parameter, NULL context parameter, and all flags set. */ trace("Calling DirectDrawEnumerateExA with all flags set and NULL context.\n"); @@ -274,7 +272,7 @@ static void test_DirectDrawEnumerateExA(void) DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES | DDENUM_NONDISPLAYDEVICES); - ok(ret == DD_OK, "Expected DD_OK, got %d\n", ret); + ok(ret == DD_OK, "Got hr %#lx.\n", ret); }
static BOOL WINAPI test_callbackExW(GUID *lpGUID, WCHAR *lpDriverDescription, @@ -298,26 +296,26 @@ static void test_DirectDrawEnumerateExW(void)
/* Test with NULL callback parameter. */ ret = pDirectDrawEnumerateExW(NULL, NULL, 0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Got hr %#lx.\n", ret);
/* Test with invalid callback parameter. */ ret = pDirectDrawEnumerateExW((LPDDENUMCALLBACKEXW)0xdeadbeef, NULL, 0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and invalid flags */ ret = pDirectDrawEnumerateExW(test_callbackExW, NULL, ~0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter and NULL context parameter. */ ret = pDirectDrawEnumerateExW(test_callbackExW, NULL, 0); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Got hr %#lx.\n", ret);
/* Test with valid callback parameter, NULL context parameter, and all flags set. */ ret = pDirectDrawEnumerateExW(test_callbackExW, NULL, DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES | DDENUM_NONDISPLAYDEVICES); - ok(ret == DDERR_UNSUPPORTED, "Expected DDERR_UNSUPPORTED, got %d\n", ret); + ok(ret == DDERR_UNSUPPORTED, "Got hr %#lx.\n", ret); }
static void adddisplaymode(DDSURFACEDESC *lpddsd) @@ -340,7 +338,7 @@ static void flushdisplaymodes(void) static HRESULT WINAPI enummodescallback(DDSURFACEDESC *lpddsd, void *lpContext) { if (winetest_debug > 1) - trace("Width = %i, Height = %i, bpp = %i, Refresh Rate = %i, Pitch = %i, flags =%02X\n", + trace("Width = %li, Height = %li, bpp = %li, Refresh Rate = %li, Pitch = %li, flags = %#lx\n", lpddsd->dwWidth, lpddsd->dwHeight, U1(lpddsd->ddpfPixelFormat).dwRGBBitCount, U2(*lpddsd).dwRefreshRate, U1(*lpddsd).lPitch, lpddsd->dwFlags);
@@ -370,15 +368,15 @@ static HRESULT WINAPI enummodescallback(DDSURFACEDESC *lpddsd, void *lpContext) static HRESULT WINAPI enummodescallback_16bit(DDSURFACEDESC *lpddsd, void *lpContext) { if (winetest_debug > 1) - trace("Width = %i, Height = %i, bpp = %i, Refresh Rate = %i, Pitch = %i, flags =%02X\n", + trace("Width = %li, Height = %li, bpp = %li, Refresh Rate = %li, Pitch = %li, flags = %#lx\n", lpddsd->dwWidth, lpddsd->dwHeight, U1(lpddsd->ddpfPixelFormat).dwRGBBitCount, U2(*lpddsd).dwRefreshRate, U1(*lpddsd).lPitch, lpddsd->dwFlags);
ok(lpddsd->dwFlags == (DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_REFRESHRATE), - "Wrong surface description flags %02X\n", lpddsd->dwFlags); - ok(lpddsd->ddpfPixelFormat.dwFlags == DDPF_RGB, "Wrong pixel format flag %02X\n", + "Wrong surface description flags %#lx\n", lpddsd->dwFlags); + ok(lpddsd->ddpfPixelFormat.dwFlags == DDPF_RGB, "Wrong pixel format flag %#lx\n", lpddsd->ddpfPixelFormat.dwFlags); - ok(U1(lpddsd->ddpfPixelFormat).dwRGBBitCount == 16, "Expected 16 bpp got %i\n", + ok(U1(lpddsd->ddpfPixelFormat).dwRGBBitCount == 16, "Expected 16 bpp got %li\n", U1(lpddsd->ddpfPixelFormat).dwRGBBitCount);
/* Check that the pitch is valid if applicable */ @@ -409,7 +407,7 @@ static HRESULT WINAPI enummodescallback_16bit(DDSURFACEDESC *lpddsd, void *lpCon static HRESULT WINAPI enummodescallback_count(DDSURFACEDESC *lpddsd, void *lpContext) { ok(lpddsd->dwFlags == (DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_REFRESHRATE), - "Wrong surface description flags %02X\n", lpddsd->dwFlags); + "Wrong surface description flags %#lx\n", lpddsd->dwFlags);
modes16bpp_cnt++;
@@ -429,7 +427,7 @@ static void enumdisplaymodes(void)
/* Flags parameter is reserved in very old ddraw versions (3 and older?) and must be 0 */ rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
count = modes16bpp_cnt;
@@ -442,7 +440,7 @@ static void enumdisplaymodes(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x001F;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -451,7 +449,7 @@ static void enumdisplaymodes(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -460,7 +458,7 @@ static void enumdisplaymodes(void) U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x000F;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
@@ -468,14 +466,14 @@ static void enumdisplaymodes(void) ddsd.ddpfPixelFormat.dwFlags = DDPF_YUV;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; ddsd.ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -483,14 +481,14 @@ static void enumdisplaymodes(void) ddsd.ddpfPixelFormat.dwFlags = 0;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; ddsd.dwFlags = 0;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_count); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == modes_cnt, "Expected %d modes got %d\n", modes_cnt, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -498,7 +496,7 @@ static void enumdisplaymodes(void) U1(ddsd).lPitch = 123;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == count, "Expected %d modes got %d\n", count, modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -509,7 +507,7 @@ static void enumdisplaymodes(void) U2(ddsd).dwRefreshRate = 2;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == 0, "Expected 0 modes got %d\n", modes16bpp_cnt);
modes16bpp_cnt = 0; @@ -521,7 +519,7 @@ static void enumdisplaymodes(void) skip("Ddraw version too old. Skipping.\n"); return; } - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); refresh_count = refresh_rate_cnt;
if(refresh_rate) @@ -531,12 +529,12 @@ static void enumdisplaymodes(void) U2(ddsd).dwRefreshRate = refresh_rate;
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, &ddsd, 0, enummodescallback_16bit); - ok(rc==DD_OK,"EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(modes16bpp_cnt == refresh_count, "Expected %d modes got %d\n", refresh_count, modes16bpp_cnt); }
rc = IDirectDraw_EnumDisplayModes(lpDD, 0, NULL, 0, enummodescallback); - ok(rc==DD_OK, "EnumDisplayModes returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); }
@@ -549,7 +547,7 @@ static void setdisplaymode(int i)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(rc==DD_OK,"SetCooperativeLevel returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); if (modes[i].dwFlags & DDSD_PIXELFORMAT) { if (modes[i].ddpfPixelFormat.dwFlags & DDPF_RGB) @@ -557,7 +555,7 @@ static void setdisplaymode(int i) rc = IDirectDraw_SetDisplayMode(lpDD, modes[i].dwWidth, modes[i].dwHeight, U1(modes[i].ddpfPixelFormat).dwRGBBitCount); - ok(DD_OK==rc || DDERR_UNSUPPORTED==rc,"SetDisplayMode returned: %x\n",rc); + ok(rc == DD_OK || rc == DDERR_UNSUPPORTED, "Got hr %#lx.\n", rc); if (rc == DD_OK) { RECT scrn, test, virt; @@ -565,7 +563,7 @@ static void setdisplaymode(int i) SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); OffsetRect(&virt, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN)); SetRect(&scrn, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); - trace("Mode (%dx%d) [%dx%d] (%d %d)x(%d %d)\n", modes[i].dwWidth, modes[i].dwHeight, + trace("Mode (%ldx%ld) [%ldx%ld] (%ld %ld)-(%ld %ld)\n", modes[i].dwWidth, modes[i].dwHeight, scrn.right, scrn.bottom, virt.left, virt.top, virt.right, virt.bottom); if (!EqualRect(&scrn, &orig_rect)) { @@ -580,7 +578,7 @@ static void setdisplaymode(int i) /* Check that switching to normal cooperative level does not restore the display mode */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL); - ok(rc==DD_OK, "SetCooperativeLevel returned %x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); SetRect(&test, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); rect_result = EqualRect(&scrn, &test); ok(rect_result!=0, "Setting cooperative level to DDSCL_NORMAL changed the display mode\n"); @@ -588,7 +586,7 @@ static void setdisplaymode(int i) /* Go back to fullscreen */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); - ok(rc==DD_OK, "SetCooperativeLevel returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* If the display mode was changed, set the correct mode to avoid irrelevant failures */ @@ -597,11 +595,11 @@ static void setdisplaymode(int i) rc = IDirectDraw_SetDisplayMode(lpDD, modes[i].dwWidth, modes[i].dwHeight, U1(modes[i].ddpfPixelFormat).dwRGBBitCount); - ok(DD_OK==rc, "SetDisplayMode returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); } } rc = IDirectDraw_RestoreDisplayMode(lpDD); - ok(DD_OK==rc,"RestoreDisplayMode returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); } } } @@ -620,10 +618,10 @@ static void createsurface(void) DDSCAPS_COMPLEX; ddsd.dwBackBufferCount = 1; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSPrimary, NULL ); - ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ddscaps.dwCaps = DDSCAPS_BACKBUFFER; rc = IDirectDrawSurface_GetAttachedSurface(lpDDSPrimary, &ddscaps, &lpDDSBack); - ok(rc==DD_OK,"GetAttachedSurface returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); }
static void destroysurface(void) @@ -642,17 +640,17 @@ static void testsurface(void) HRESULT rc;
rc = IDirectDrawSurface_GetDC(lpDDSBack, &hdc); - ok(rc==DD_OK, "IDirectDrawSurface_GetDC returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); SetBkColor(hdc, RGB(0, 0, 255)); SetTextColor(hdc, RGB(255, 255, 0)); TextOutA(hdc, 0, 0, testMsg, strlen(testMsg)); rc = IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc); - ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
while (1) { rc = IDirectDrawSurface_Flip(lpDDSPrimary, NULL, DDFLIP_WAIT); - ok(rc==DD_OK || rc==DDERR_SURFACELOST, "IDirectDrawSurface_BltFast returned: %x\n",rc); + ok(rc == DD_OK || rc==DDERR_SURFACELOST, "Got hr %#lx.\n", rc);
if (rc == DD_OK) { @@ -661,7 +659,7 @@ static void testsurface(void) else if (rc == DDERR_SURFACELOST) { rc = IDirectDrawSurface_Restore(lpDDSPrimary); - ok(rc==DD_OK, "IDirectDrawSurface_Restore returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); } } } @@ -694,14 +692,14 @@ static void testcooperativelevels_normal(void) surfacedesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Do some tests with DDSCL_NORMAL mode */
/* Fullscreen mode + normal mode + exclusive mode */
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL); - ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received: %x\n", rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
sfw=FALSE; if(hwnd2) @@ -710,7 +708,7 @@ static void testcooperativelevels_normal(void) skip("Failed to create the second window\n");
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
if(sfw) ok(GetForegroundWindow()==hwnd,"Expected the main windows (%p) for foreground, received the second one (%p)\n",hwnd, hwnd2); @@ -722,14 +720,14 @@ static void testcooperativelevels_normal(void) skip("Unsupported mode\n"); else { - ok(rc == DD_OK, "IDirectDraw_CreateSurface returned %08x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc); ok(surface!=NULL, "Returned NULL surface pointer\n"); } if(surface && surface != (IDirectDrawSurface *)0xdeadbeef) IDirectDrawSurface_Release(surface);
/* Exclusive mode + normal mode */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_EXCLUSIVE | DDSCL_NORMAL); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_NORMAL) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Fullscreen mode + normal mode */
@@ -737,13 +735,13 @@ static void testcooperativelevels_normal(void) if(hwnd2) sfw=SetForegroundWindow(hwnd2);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_FULLSCREEN | DDSCL_NORMAL) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
if(sfw) ok(GetForegroundWindow()==hwnd2,"Expected the second windows (%p) for foreground, received the main one (%p)\n",hwnd2, hwnd);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_NORMAL); - ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* Try creating a double buffered primary in fullscreen + normal mode */ rc = IDirectDraw_CreateSurface(lpDD, &surfacedesc, &surface, NULL); @@ -751,7 +749,7 @@ static void testcooperativelevels_normal(void) skip("Unsupported mode\n"); else { - ok(rc == DDERR_NOEXCLUSIVEMODE, "IDirectDraw_CreateSurface returned %08x\n", rc); + ok(rc == DDERR_NOEXCLUSIVEMODE, "Got hr %#lx.\n", rc); ok(surface == NULL, "Returned surface pointer is %p\n", surface); }
@@ -764,13 +762,13 @@ static void testcooperativelevels_normal(void)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
if(sfw) ok(GetForegroundWindow()==hwnd2,"Expected the second windows (%p) for foreground, received the main one (%p)\n",hwnd2, hwnd);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL); - ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* Try creating a double buffered primary in normal mode */ rc = IDirectDraw_CreateSurface(lpDD, &surfacedesc, &surface, NULL); @@ -778,7 +776,7 @@ static void testcooperativelevels_normal(void) skip("Unsupported mode\n"); else { - ok(rc == DDERR_NOEXCLUSIVEMODE, "IDirectDraw_CreateSurface returned %08x\n", rc); + ok(rc == DDERR_NOEXCLUSIVEMODE, "Got hr %#lx.\n", rc); ok(surface == NULL, "Returned surface pointer is %p\n", surface); } if(surface && surface != (IDirectDrawSurface *)0xdeadbeef) IDirectDrawSurface_Release(surface); @@ -790,18 +788,18 @@ static void testcooperativelevels_normal(void)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL | FULLSCREEN) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
if(sfw) ok(GetForegroundWindow()==hwnd2,"Expected the second windows (%p) for foreground, received the main one (%p)\n",hwnd2, hwnd);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_NORMAL | DDSCL_FULLSCREEN); - ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* Set the focus window */
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_SETFOCUSWINDOW);
@@ -811,7 +809,7 @@ static void testcooperativelevels_normal(void) return; }
- ok(rc==DD_OK, "Expected DD_OK, received %x\n", rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); @@ -822,61 +820,61 @@ static void testcooperativelevels_normal(void) return; }
- ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* Set the focus window a second time*/ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) the second time returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* Test DDSCL_SETFOCUSWINDOW with the other flags. They should all fail, except of DDSCL_NOWINDOWCHANGES */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* This one succeeds */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NOWINDOWCHANGES | DDSCL_SETFOCUSWINDOW); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NOWINDOWCHANGES | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_MULTITHREADED | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_MULTITHREADED | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FPUSETUP | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FPUSETUP | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FPUPRESERVE | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FPUPRESERVE | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWREBOOT | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_ALLOWREBOOT | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_ALLOWMODEX | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Set the device window without any other flags. Should give an error */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETDEVICEWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETDEVICEWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Set device window with DDSCL_NORMAL */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
/* Also set the focus window. Should give an error */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_SETDEVICEWINDOW | DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_NORMAL | DDSCL_SETDEVICEWINDOW | DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* All done */ } @@ -896,17 +894,17 @@ static void testcooperativelevels_exclusive(void) /* Try to set exclusive mode only */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_EXCLUSIVE); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Full screen mode only */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN); - ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FULLSCREEN) returned: %x\n",rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
/* Full screen mode + exclusive mode */
rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received %x\n", rc); + ok(rc == DDERR_INVALIDPARAMS, "Got hr %#lx.\n", rc);
sfw=FALSE; if(hwnd2) @@ -916,7 +914,7 @@ static void testcooperativelevels_exclusive(void)
rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); - ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) returned: %x\n",rc); + ok(rc == DD_OK, "Got hr %#lx.\n", rc);
if(sfw) ok(GetForegroundWindow()==hwnd,"Expected the main windows (%p) for foreground, received the second one (%p)\n",hwnd, hwnd2); @@ -929,8 +927,8 @@ static void testcooperativelevels_exclusive(void) /* Set the focus window. Should fail */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_HWNDALREADYSET || - broken(rc==DDERR_INVALIDPARAMS) /* NT4/Win95 */,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc == DDERR_HWNDALREADYSET || + broken(rc==DDERR_INVALIDPARAMS) /* NT4/Win95 */, "Got hr %#lx.\n", rc);
/* All done */ @@ -947,7 +945,7 @@ static void testddraw3(void) IDirectDraw3 *dd3; HRESULT hr; hr = IDirectDraw_QueryInterface(lpDD, &My_IID_IDirectDraw3, (void **) &dd3); - ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectDraw3 returned 0x%08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); if(SUCCEEDED(hr) && dd3) IDirectDraw3_Release(dd3); }
@@ -965,7 +963,7 @@ static void testddraw7(void) win_skip("DirectDraw7 is not supported\n"); return; } - ok(hr==DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
if (hr==DD_OK) { @@ -977,7 +975,7 @@ static void testddraw7(void) pend[1] = 0xdeadbeef;
hr = IDirectDraw7_GetDeviceIdentifier(dd7, pdddi2, 0); - ok(hr==DD_OK, "get device identifier failed with %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr);
if (hr==DD_OK) { @@ -996,7 +994,7 @@ static void testddraw7(void) pend[0] = 0xdeadbeef; pend[1] = 0xdeadbeef; hr = IDirectDraw7_GetDeviceIdentifier(dd7, pdddi2, DDGDI_GETHOSTIDENTIFIER); - ok(hr==DD_OK, "get device identifier failed with %08x\n", hr); + ok(hr == DD_OK, "Got hr %#lx.\n", hr); if (hr==DD_OK) { /* szDriver contains the name of the driver DLL */