ddraw/tests: Fix compilation on systems that don't support nameless unions.
This commit is contained in:
parent
02bb70fc3b
commit
3315918eac
|
@ -4547,7 +4547,7 @@ static void set_surface_desc_test(void)
|
|||
IDirectDrawSurface_Release(surface);
|
||||
hr = IDirectDrawSurface3_GetSurfaceDesc(surface3, &ddsd);
|
||||
ok(SUCCEEDED(hr), "IDirectDrawSurface3_GetSurfaceDesc failed, hr %#x.\n", hr);
|
||||
old_pitch = ddsd.lPitch;
|
||||
old_pitch = U1(ddsd).lPitch;
|
||||
|
||||
/* Setting width and height is an error */
|
||||
reset_ddsd(&ddsd);
|
||||
|
@ -4570,14 +4570,14 @@ static void set_surface_desc_test(void)
|
|||
/* Setting the pitch is an error */
|
||||
reset_ddsd(&ddsd);
|
||||
ddsd.dwFlags = DDSD_PITCH;
|
||||
ddsd.lPitch = 1024;
|
||||
U1(ddsd).lPitch = 1024;
|
||||
hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0);
|
||||
ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc returned %#x, expected %#x\n", hr, DDERR_INVALIDPARAMS);
|
||||
ddsd.dwFlags = DDSD_PITCH | DDSD_LPSURFACE;
|
||||
ddsd.lpSurface = data;
|
||||
hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0);
|
||||
ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc returned %#x, expected %#x\n", hr, DDERR_INVALIDPARAMS);
|
||||
ddsd.lPitch = old_pitch;
|
||||
U1(ddsd).lPitch = old_pitch;
|
||||
hr = IDirectDrawSurface3_SetSurfaceDesc(surface3, &ddsd, 0);
|
||||
ok(hr == DDERR_INVALIDPARAMS, "SetSurfaceDesc returned %#x, expected %#x\n", hr, DDERR_INVALIDPARAMS);
|
||||
|
||||
|
|
|
@ -225,17 +225,17 @@ static void yv12_test(void)
|
|||
/* Luminance */
|
||||
for (y = 0; y < desc.dwHeight; y++)
|
||||
{
|
||||
memset(base + desc.lPitch * y, 0x10, desc.dwWidth);
|
||||
memset(base + U1(desc).lPitch * y, 0x10, desc.dwWidth);
|
||||
}
|
||||
/* V */
|
||||
for (; y < desc.dwHeight + desc.dwHeight / 4; y++)
|
||||
{
|
||||
memset(base + desc.lPitch * y, 0x20, desc.dwWidth);
|
||||
memset(base + U1(desc).lPitch * y, 0x20, desc.dwWidth);
|
||||
}
|
||||
/* U */
|
||||
for (; y < desc.dwHeight + desc.dwHeight / 2; y++)
|
||||
{
|
||||
memset(base + desc.lPitch * y, 0x30, desc.dwWidth);
|
||||
memset(base + U1(desc).lPitch * y, 0x30, desc.dwWidth);
|
||||
}
|
||||
|
||||
hr = IDirectDrawSurface7_Unlock(surface, NULL);
|
||||
|
@ -276,9 +276,9 @@ static void yv12_test(void)
|
|||
|
||||
base = desc.lpSurface;
|
||||
ok(base[0] == 0x10, "Y data is 0x%02x, expected 0x10\n", base[0]);
|
||||
base += desc.dwHeight * desc.lPitch;
|
||||
base += desc.dwHeight * U1(desc).lPitch;
|
||||
todo_wine ok(base[0] == 0x20, "V data is 0x%02x, expected 0x20\n", base[0]);
|
||||
base += desc.dwHeight / 4 * desc.lPitch;
|
||||
base += desc.dwHeight / 4 * U1(desc).lPitch;
|
||||
todo_wine ok(base[0] == 0x30, "U data is 0x%02x, expected 0x30\n", base[0]);
|
||||
|
||||
hr = IDirectDrawSurface7_Unlock(dst, NULL);
|
||||
|
|
Loading…
Reference in New Issue