Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=17233 Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ddraw/ddraw.c | 137 ++++++++++++++++++++++++++++++-------- dlls/ddraw/tests/ddraw1.c | 16 ++--- dlls/ddraw/tests/ddraw2.c | 16 ++--- dlls/ddraw/tests/ddraw4.c | 16 ++--- dlls/ddraw/tests/ddraw7.c | 16 ++--- 5 files changed, 142 insertions(+), 59 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index afd2875ea21..866b7089080 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -3174,6 +3174,9 @@ static HRESULT CALLBACK EnumSurfacesCallback2Thunk(IDirectDrawSurface7 *surface, struct ddraw_surface *surface_impl = impl_from_IDirectDrawSurface7(surface); struct surfacescallback2_context *cbcontext = context;
+ if (!surface) + return cbcontext->func(NULL, surface_desc, cbcontext->context); + IDirectDrawSurface4_AddRef(&surface_impl->IDirectDrawSurface4_iface); IDirectDrawSurface7_Release(surface);
@@ -3187,6 +3190,9 @@ static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface, struct ddraw_surface *surface_impl = impl_from_IDirectDrawSurface7(surface); struct surfacescallback_context *cbcontext = context;
+ if (!surface) + return cbcontext->func(NULL, (DDSURFACEDESC *)surface_desc, cbcontext->context); + IDirectDrawSurface_AddRef(&surface_impl->IDirectDrawSurface_iface); IDirectDrawSurface7_Release(surface);
@@ -3194,6 +3200,34 @@ static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface, (DDSURFACEDESC *)surface_desc, cbcontext->context); }
+struct enum_surface_mode_params +{ + IDirectDraw7 *ddraw; + const DDSURFACEDESC2 *desc; + LPDDENUMSURFACESCALLBACK7 callback; + void *context; +}; + +static HRESULT CALLBACK enum_surface_mode_callback(DDSURFACEDESC2 *surface_desc, void *context) +{ + const struct enum_surface_mode_params *params = context; + DDSURFACEDESC2 desc = *params->desc; + IDirectDrawSurface7 *surface; + + desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_PIXELFORMAT; + desc.dwWidth = surface_desc->dwWidth; + desc.dwHeight = surface_desc->dwHeight; + desc.u1.lPitch = surface_desc->u1.lPitch; + desc.u4.ddpfPixelFormat = surface_desc->u4.ddpfPixelFormat; + + if (SUCCEEDED(ddraw7_CreateSurface(params->ddraw, &desc, &surface, NULL))) + { + IDirectDrawSurface7_Release(surface); + return params->callback(NULL, &desc, params->context); + } + return DDENUMRET_OK; +} + /***************************************************************************** * IDirectDraw7::EnumSurfaces * @@ -3214,52 +3248,101 @@ static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface, * *****************************************************************************/ static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD flags, - DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMSURFACESCALLBACK7 Callback) + DDSURFACEDESC2 *surface_desc, void *context, LPDDENUMSURFACESCALLBACK7 callback) { struct ddraw *ddraw = impl_from_IDirectDraw7(iface); - struct ddraw_surface *surf; - BOOL all, nomatch; - DDSURFACEDESC2 desc; - struct list *entry, *entry2; + HRESULT hr = DD_OK;
TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", - iface, flags, DDSD, Context, Callback); - - all = flags & DDENUMSURFACES_ALL; - nomatch = !!(flags & DDENUMSURFACES_NOMATCH); + iface, flags, surface_desc, context, callback);
- if (!Callback) + if (!callback) return DDERR_INVALIDPARAMS;
- wined3d_mutex_lock(); - - /* Use the _SAFE enumeration, the app may destroy enumerated surfaces */ - LIST_FOR_EACH_SAFE(entry, entry2, &ddraw->surface_list) + if (flags & DDENUMSURFACES_CANBECREATED) { - surf = LIST_ENTRY(entry, struct ddraw_surface, surface_list_entry); + IDirectDrawSurface7 *surface; + + if ((flags & (DDENUMSURFACES_ALL | DDENUMSURFACES_MATCH | DDENUMSURFACES_NOMATCH)) != DDENUMSURFACES_MATCH) + return DDERR_INVALIDPARAMS;
- if (!surf->iface_count) + wined3d_mutex_lock(); + + if (surface_desc->dwFlags & (DDSD_WIDTH | DDSD_HEIGHT)) { - WARN("Not enumerating surface %p because it doesn't have any references.\n", surf); - continue; + if (SUCCEEDED(ddraw7_CreateSurface(iface, surface_desc, &surface, NULL))) + { + struct ddraw_surface *surface_impl = impl_from_IDirectDrawSurface7(surface); + callback(NULL, &surface_impl->surface_desc, context); + IDirectDrawSurface7_Release(surface); + } } - - if (all || (nomatch != ddraw_match_surface_desc(DDSD, &surf->surface_desc))) + else { - TRACE("Enumerating surface %p.\n", surf); - desc = surf->surface_desc; - IDirectDrawSurface7_AddRef(&surf->IDirectDrawSurface7_iface); - if (Callback(&surf->IDirectDrawSurface7_iface, &desc, Context) != DDENUMRET_OK) + DDSURFACEDESC2 desc = { + .dwSize = sizeof(desc), + .dwFlags = DDSD_PIXELFORMAT, + .u4.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT), + }; + struct enum_surface_mode_params params = + { + .ddraw = iface, + .desc = surface_desc, + .callback = callback, + .context = context, + }; + struct wined3d_display_mode mode; + + if (FAILED(hr = wined3d_output_get_display_mode(ddraw->wined3d_output, &mode, NULL))) + { + ERR("Failed to get display mode, hr %#x.\n", hr); wined3d_mutex_unlock(); - return DD_OK; + return hr_ddraw_from_wined3d(hr); } + + ddrawformat_from_wined3dformat(&desc.u4.ddpfPixelFormat, mode.format_id); + hr = ddraw7_EnumDisplayModes(iface, 0, &desc, ¶ms, enum_surface_mode_callback); } + + wined3d_mutex_unlock(); } + else if (flags & DDENUMSURFACES_DOESEXIST) + { + struct ddraw_surface *surface, *cursor; + BOOL nomatch = !!(flags & DDENUMSURFACES_NOMATCH);
- wined3d_mutex_unlock(); + wined3d_mutex_lock();
- return DD_OK; + /* Use the safe enumeration, as the callback may destroy surfaces. */ + LIST_FOR_EACH_ENTRY_SAFE(surface, cursor, &ddraw->surface_list, struct ddraw_surface, surface_list_entry) + { + if (!surface->iface_count) + { + WARN("Not enumerating surface %p because it doesn't have any references.\n", surface); + continue; + } + + if ((flags & DDENUMSURFACES_ALL) + || nomatch != ddraw_match_surface_desc(surface_desc, &surface->surface_desc)) + { + DDSURFACEDESC2 desc = surface->surface_desc; + + TRACE("Enumerating surface %p.\n", surface); + IDirectDrawSurface7_AddRef(&surface->IDirectDrawSurface7_iface); + if (callback(&surface->IDirectDrawSurface7_iface, &desc, context) != DDENUMRET_OK) + break; + } + } + + wined3d_mutex_unlock(); + } + else + { + return DDERR_INVALIDPARAMS; + } + + return hr; }
static HRESULT WINAPI ddraw4_EnumSurfaces(IDirectDraw4 *iface, DWORD flags, diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 4a1818af6ab..f74d12d9fda 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -12182,11 +12182,11 @@ static void test_enum_surfaces(void) ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -12261,15 +12261,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -12285,7 +12285,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count); + ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; desc.dwWidth = desc.dwHeight = 32; @@ -12296,7 +12296,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); @@ -12304,7 +12304,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface_Release(param.surfaces[0]);
desc.dwFlags |= DDSD_PIXELFORMAT; diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 03615c61cea..d4e681c0164 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -13158,11 +13158,11 @@ static void test_enum_surfaces(void) ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -13237,15 +13237,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -13261,7 +13261,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count); + ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; desc.dwWidth = desc.dwHeight = 32; @@ -13272,7 +13272,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw2_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); @@ -13280,7 +13280,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw2_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface2_Release(param.surfaces[0]);
desc.dwFlags |= DDSD_PIXELFORMAT; diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index ce6c8aaf228..f50fc1cb53b 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -15746,11 +15746,11 @@ static void test_enum_surfaces(void) ok(hr == DD_OK, "Failed to set cooperative level, hr %#x.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -15825,15 +15825,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -15849,7 +15849,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count); + ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; desc.dwWidth = desc.dwHeight = 32; @@ -15860,7 +15860,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw4_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); @@ -15868,7 +15868,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw4_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface4_Release(param.surfaces[0]);
desc.dwFlags |= DDSD_PIXELFORMAT; diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 466fcc544a9..1ddd3cdb0e2 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -15152,11 +15152,11 @@ static void test_enum_surfaces(void) ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, NULL, NULL, enum_surfaces_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x.\n", hr);
memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -15235,15 +15235,15 @@ static void test_enum_surfaces(void)
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED, &desc, ¶m, enum_surfaces_create_cb); - todo_wine ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr); + ok(hr == DDERR_INVALIDPARAMS, "Failed to enumerate surfaces, hr %#x.\n", hr);
/* When not passed width and height, the callback is called with every * available display resolution. */ @@ -15259,7 +15259,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count); + ok(param.count == param.mode_count, "Expected %u surfaces, got %u.\n", param.mode_count, param.count);
desc.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT; desc.dwWidth = desc.dwHeight = 32; @@ -15270,7 +15270,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count);
hr = IDirectDraw7_CreateSurface(ddraw, &desc, ¶m.surfaces[0], NULL); ok(hr == DD_OK, "Failed to create surface, hr %#x.\n", hr); @@ -15278,7 +15278,7 @@ static void test_enum_surfaces(void) hr = IDirectDraw7_EnumSurfaces(ddraw, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &desc, ¶m, enum_surfaces_create_cb); ok(hr == DD_OK, "Failed to enumerate surfaces, hr %#x.\n", hr); - todo_wine ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); + ok(param.count == 1, "Got unexpected number of enumerated surfaces %u.\n", param.count); IDirectDrawSurface7_Release(param.surfaces[0]);
desc.dwFlags |= DDSD_PIXELFORMAT;