Commit ff659522 authored by Ričardas Barkauskas's avatar Ričardas Barkauskas Committed by Alexandre Julliard

ddraw: Fix DDSCAPS_3DDEVICE surfaces always setting DDSCAPS_VISIBLE.

parent 7402761e
......@@ -3511,12 +3511,17 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY;
}
if (desc->ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE))
if (desc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
{
usage |= WINED3DUSAGE_RENDERTARGET;
desc->ddsCaps.dwCaps |= DDSCAPS_VISIBLE;
}
if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
{
usage |= WINED3DUSAGE_RENDERTARGET;
}
if (desc->ddsCaps.dwCaps & (DDSCAPS_OVERLAY))
{
usage |= WINED3DUSAGE_OVERLAY;
......
......@@ -3593,7 +3593,7 @@ static void BackBuffer3DCreateSurfaceTest(void)
{
hr = IDirectDrawSurface_GetSurfaceDesc(surf, &created_ddsd);
ok(SUCCEEDED(hr), "IDirectDraw_GetSurfaceDesc failed: 0x%08x\n", hr);
todo_wine ok(created_ddsd.ddsCaps.dwCaps == expected_caps,
ok(created_ddsd.ddsCaps.dwCaps == expected_caps,
"GetSurfaceDesc returned caps %x, expected %x\n", created_ddsd.ddsCaps.dwCaps,
expected_caps);
......
......@@ -2916,7 +2916,7 @@ static void SurfaceCapsTest(void)
hr = IDirectDrawSurface_GetSurfaceDesc(surface1, &desc);
ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc failed with %08x\n", hr);
if (!(create_caps[i] & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE)))
if (!(create_caps[i] & DDSCAPS_PRIMARYSURFACE))
ok(desc.ddsCaps.dwCaps == expected_caps[i],
"GetSurfaceDesc test %d returned caps %x, expected %x\n", i,
desc.ddsCaps.dwCaps, expected_caps[i]);
......@@ -2971,7 +2971,7 @@ static void SurfaceCapsTest(void)
hr = IDirectDrawSurface7_GetSurfaceDesc(surface7, &desc2);
ok(hr == DD_OK, "IDirectDrawSurface_GetSurfaceDesc failed with %08x\n", hr);
if (!(create_caps[i] & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE)))
if (!(create_caps[i] & DDSCAPS_PRIMARYSURFACE))
ok(desc2.ddsCaps.dwCaps == expected_caps[i],
"GetSurfaceDesc test %d returned caps %x, expected %x\n", i,
desc2.ddsCaps.dwCaps, expected_caps[i]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment