Commit 76420a24 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Only set DDSCAPS_VISIBLE on the root surface.

parent 28efaec2
......@@ -5979,7 +5979,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
/* Only one surface in the flipping chain is a back buffer, one is
* a front buffer, the others are just flippable surfaces. */
desc->ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER | DDSCAPS_BACKBUFFER);
desc->ddsCaps.dwCaps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER
| DDSCAPS_BACKBUFFER);
if (!i)
desc->ddsCaps.dwCaps |= DDSCAPS_BACKBUFFER;
desc->dwBackBufferCount = 0;
......
......@@ -3583,7 +3583,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer1, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer1, &caps, &backbuffer2);
......@@ -3592,7 +3592,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer2, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer2, &caps, &backbuffer3);
......@@ -3601,7 +3601,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer3, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer3, &caps, &surface);
......
......@@ -4264,7 +4264,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer1, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer1, &caps, &backbuffer2);
......@@ -4273,7 +4273,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer2, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer2, &caps, &backbuffer3);
......@@ -4282,7 +4282,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(backbuffer3, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface_GetAttachedSurface(backbuffer3, &caps, &surface);
......
......@@ -4868,7 +4868,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_GetSurfaceDesc(backbuffer1, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface4_GetAttachedSurface(backbuffer1, &caps, &backbuffer2);
......@@ -4877,7 +4877,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_GetSurfaceDesc(backbuffer2, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface4_GetAttachedSurface(backbuffer2, &caps, &backbuffer3);
......@@ -4886,7 +4886,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_GetSurfaceDesc(backbuffer3, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface4_GetAttachedSurface(backbuffer3, &caps, &surface);
......
......@@ -4755,7 +4755,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_GetSurfaceDesc(backbuffer1, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_BACKBUFFER),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface7_GetAttachedSurface(backbuffer1, &caps, &backbuffer2);
......@@ -4764,7 +4764,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_GetSurfaceDesc(backbuffer2, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface7_GetAttachedSurface(backbuffer2, &caps, &backbuffer3);
......@@ -4773,7 +4773,7 @@ static void test_flip(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_GetSurfaceDesc(backbuffer3, &surface_desc);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
todo_wine ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
ok((surface_desc.ddsCaps.dwCaps & ~placement) == (DDSCAPS_FLIP | DDSCAPS_COMPLEX),
"Got unexpected caps %#x.\n", surface_desc.ddsCaps.dwCaps);
hr = IDirectDrawSurface7_GetAttachedSurface(backbuffer3, &caps, &surface);
......
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