mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch to implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces and fix some bugs.
This commit is contained in:
parent
174fd8ca69
commit
f925ee9336
@ -39,7 +39,7 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [18]:**
|
||||
**Bug fixes and features included in the next upcoming release [19]:**
|
||||
|
||||
* Add stub fltmgr.sys (filter manager driver) ([Wine Bug #23583](https://bugs.winehq.org/show_bug.cgi?id=23583))
|
||||
* Add stub for ntoskrnl.PsRemoveLoadImageNotifyRoutine
|
||||
@ -52,6 +52,7 @@ Included bug fixes and improvements
|
||||
* Fix device paths in HKLM\SYSTEM\MountedDevices ([Wine Bug #38235](https://bugs.winehq.org/show_bug.cgi?id=38235))
|
||||
* Fix handling of ANSI NTLM credentials ([Wine Bug #37063](https://bugs.winehq.org/show_bug.cgi?id=37063))
|
||||
* Fix invalid memory access in get_registry_locale_info ([Wine Bug #38344](https://bugs.winehq.org/show_bug.cgi?id=38344))
|
||||
* Implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces ([Wine Bug #17233](https://bugs.winehq.org/show_bug.cgi?id=17233))
|
||||
* Implement empty enumerator for IWiaDevMgr::EnumDeviceInfo ([Wine Bug #27775](https://bugs.winehq.org/show_bug.cgi?id=27775))
|
||||
* Implement mscoree._CorValidateImage for mono runtime
|
||||
* Implement proper handling of CLI .NET images in Wine library loader
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -20,6 +20,7 @@ wine-staging (1.7.40) UNRELEASED; urgency=low
|
||||
* Added patch to stub ntoskrnl.PsRemoveLoadImageNotifyRoutine
|
||||
* Added patch to fix invalid memory access in get_registry_locale_info.
|
||||
* Added patch to allow to open files/directories without any access rights in order to query attributes.
|
||||
* Added patch to implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces and fix some bugs.
|
||||
* Removed patch to fix regression causing black screen on startup (accepted upstream).
|
||||
* Removed patch to fix edge cases in TOOLTIPS_GetTipText (fixed upstream).
|
||||
* Removed patch for IConnectionPoint/INetworkListManagerEvents stub interface (accepted upstream).
|
||||
|
@ -0,0 +1,360 @@
|
||||
From e01ecc956620d02c29ed92b56372087868a4149e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 4 Apr 2015 05:49:09 +0200
|
||||
Subject: ddraw: Implement DDENUMSURFACES_CANBECREATED in
|
||||
IDirectDraw7::EnumSurfaces and fix some bugs.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 97 +++++++++++++++++++------
|
||||
dlls/ddraw/tests/d3d.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 256 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 31ec6bf..b860834 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -3119,46 +3119,97 @@ static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD Flags,
|
||||
{
|
||||
struct ddraw *ddraw = impl_from_IDirectDraw7(iface);
|
||||
struct ddraw_surface *surf;
|
||||
- BOOL all, nomatch;
|
||||
- DDSURFACEDESC2 desc;
|
||||
- struct list *entry, *entry2;
|
||||
+ DWORD match_flags = Flags & (DDENUMSURFACES_ALL | DDENUMSURFACES_NOMATCH | DDENUMSURFACES_MATCH);
|
||||
|
||||
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;
|
||||
-
|
||||
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;
|
||||
+ DDSURFACEDESC2 testdesc;
|
||||
+
|
||||
+ if (match_flags != DDENUMSURFACES_MATCH)
|
||||
+ return DDERR_INVALIDPARAMS;
|
||||
+
|
||||
+ if (!DDSD)
|
||||
+ return DDERR_INVALIDPARAMS;
|
||||
+
|
||||
+ memcpy(&testdesc, DDSD, sizeof(testdesc));
|
||||
+
|
||||
+ if (!(testdesc.dwFlags & DDSD_WIDTH))
|
||||
+ {
|
||||
+ testdesc.dwFlags |= DDSD_WIDTH;
|
||||
+ testdesc.dwWidth = 512;
|
||||
+ }
|
||||
|
||||
- if (!surf->iface_count)
|
||||
+ if (!(testdesc.dwFlags & DDSD_HEIGHT))
|
||||
{
|
||||
- WARN("Not enumerating surface %p because it doesn't have any references.\n", surf);
|
||||
- continue;
|
||||
+ testdesc.dwFlags |= DDSD_HEIGHT;
|
||||
+ testdesc.dwHeight = 512;
|
||||
}
|
||||
|
||||
- if (all || (nomatch != ddraw_match_surface_desc(DDSD, &surf->surface_desc)))
|
||||
+ if (IDirectDraw7_CreateSurface(iface, &testdesc, &surface, NULL) == DD_OK)
|
||||
+ {
|
||||
+ surf = unsafe_impl_from_IDirectDrawSurface7(surface);
|
||||
+ Callback(NULL, &surf->surface_desc, Context);
|
||||
+ IDirectDrawSurface7_Release(surface);
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Failed to create surface!\n");
|
||||
+ }
|
||||
+ else if (Flags & DDENUMSURFACES_DOESEXIST)
|
||||
+ {
|
||||
+ DDSURFACEDESC2 desc;
|
||||
+ struct list *entry, *entry2;
|
||||
+ BOOL nomatch, all;
|
||||
+
|
||||
+ /* a combination of match flags is not allowed */
|
||||
+ if (match_flags != 0 &&
|
||||
+ match_flags != DDENUMSURFACES_ALL &&
|
||||
+ match_flags != DDENUMSURFACES_MATCH &&
|
||||
+ match_flags != DDENUMSURFACES_NOMATCH)
|
||||
+ return DDERR_INVALIDPARAMS;
|
||||
+
|
||||
+ all = (Flags & DDENUMSURFACES_ALL) != 0;
|
||||
+ nomatch = (Flags & DDENUMSURFACES_NOMATCH) != 0;
|
||||
+
|
||||
+ if (!all && !DDSD)
|
||||
+ 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)
|
||||
{
|
||||
- TRACE("Enumerating surface %p.\n", surf);
|
||||
- desc = surf->surface_desc;
|
||||
- IDirectDrawSurface7_AddRef(&surf->IDirectDrawSurface7_iface);
|
||||
- if (Callback(&surf->IDirectDrawSurface7_iface, &desc, Context) != DDENUMRET_OK)
|
||||
+ surf = LIST_ENTRY(entry, struct ddraw_surface, surface_list_entry);
|
||||
+
|
||||
+ if (!surf->iface_count)
|
||||
{
|
||||
- wined3d_mutex_unlock();
|
||||
- return DD_OK;
|
||||
+ WARN("Not enumerating surface %p because it doesn't have any references.\n", surf);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (all || (nomatch != ddraw_match_surface_desc(DDSD, &surf->surface_desc)))
|
||||
+ {
|
||||
+ TRACE("Enumerating surface %p.\n", surf);
|
||||
+ desc = surf->surface_desc;
|
||||
+ IDirectDrawSurface7_AddRef(&surf->IDirectDrawSurface7_iface);
|
||||
+ if (Callback(&surf->IDirectDrawSurface7_iface, &desc, Context) != DDENUMRET_OK)
|
||||
+ {
|
||||
+ wined3d_mutex_unlock();
|
||||
+ return DD_OK;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
- }
|
||||
|
||||
- wined3d_mutex_unlock();
|
||||
+ wined3d_mutex_unlock();
|
||||
+ }
|
||||
+ else
|
||||
+ return DDERR_INVALIDPARAMS;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
|
||||
index ec4197a..457ebbc 100644
|
||||
--- a/dlls/ddraw/tests/d3d.c
|
||||
+++ b/dlls/ddraw/tests/d3d.c
|
||||
@@ -57,6 +57,11 @@ typedef struct {
|
||||
int total;
|
||||
} D3D7ECancelTest;
|
||||
|
||||
+typedef struct {
|
||||
+ UINT found;
|
||||
+ UINT surfaces;
|
||||
+} EnumSurfaceTest;
|
||||
+
|
||||
#define MAX_ENUMERATION_COUNT 10
|
||||
typedef struct
|
||||
{
|
||||
@@ -85,17 +90,21 @@ static ULONG getRefcount(IUnknown *iface)
|
||||
|
||||
static HRESULT WINAPI SurfaceCounter(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *desc, void *context)
|
||||
{
|
||||
- UINT *num = context;
|
||||
- (*num)++;
|
||||
- IDirectDrawSurface_Release(surface);
|
||||
+ EnumSurfaceTest *count = context;
|
||||
+ count->found++;
|
||||
+ if (surface)
|
||||
+ {
|
||||
+ count->surfaces++;
|
||||
+ IDirectDrawSurface_Release(surface);
|
||||
+ }
|
||||
return DDENUMRET_OK;
|
||||
}
|
||||
|
||||
static BOOL CreateDirect3D(void)
|
||||
{
|
||||
HRESULT rc;
|
||||
- DDSURFACEDESC2 ddsd;
|
||||
- UINT num;
|
||||
+ DDSURFACEDESC2 ddsd, ddsd2;
|
||||
+ EnumSurfaceTest count;
|
||||
|
||||
rc = pDirectDrawCreateEx(NULL, (void**)&lpDD,
|
||||
&IID_IDirectDraw7, NULL);
|
||||
@@ -122,9 +131,174 @@ static BOOL CreateDirect3D(void)
|
||||
if (FAILED(rc))
|
||||
return FALSE;
|
||||
|
||||
- num = 0;
|
||||
- IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_ALL | DDENUMSURFACES_DOESEXIST, NULL, &num, SurfaceCounter);
|
||||
- ok(num == 1, "Has %d surfaces, expected 1\n", num);
|
||||
+ memset(&ddsd2, 0, sizeof(ddsd2));
|
||||
+ ddsd2.dwSize = sizeof(ddsd2);
|
||||
+ ddsd2.dwFlags = DDSD_WIDTH | DDSD_HEIGHT;
|
||||
+ ddsd2.dwWidth = 256;
|
||||
+ ddsd2.dwHeight = 256;
|
||||
+
|
||||
+ /* without search type flags */
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, 0, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, 0, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_ALL, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_MATCH, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_NOMATCH, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ /* search type DDENUMSURFACES_DOESEXIST */
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST, &ddsd2, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 1, "Has %d surface descriptions, expected 1\n", count.found);
|
||||
+ ok(count.surfaces == 1, "Has %d surfaces, expected 1\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 1, "Has %d surface descriptions, expected 1\n", count.found);
|
||||
+ ok(count.surfaces == 1, "Has %d surfaces, expected 1\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_NOMATCH, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 1, "Has %d surface descriptions, expected 1\n", count.found);
|
||||
+ ok(count.surfaces == 1, "Has %d surfaces, expected 1\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH, &ddsd2, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 1, "Has %d surface descriptions, expected 1\n", count.found);
|
||||
+ ok(count.surfaces == 1, "Has %d surfaces, expected 1\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_NOMATCH, &ddsd2, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL | DDENUMSURFACES_MATCH,
|
||||
+ NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL | DDENUMSURFACES_NOMATCH,
|
||||
+ NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_MATCH | DDENUMSURFACES_NOMATCH,
|
||||
+ NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ /* search type DDENUMSURFACES_CANBECREATED */
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_CANBECREATED, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_ALL, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_NOMATCH, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, NULL, &count, SurfaceCounter);
|
||||
+ ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||
+ ok(count.found == 0, "Has %d surface descriptions, expected 0\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH, &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 1, "Has %d surface descriptions, expected 1\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
+
|
||||
+ /* combination of DDENUMSURFACES_DOESEXIST and DDENUMSURFACES_CANBECREATED */
|
||||
+
|
||||
+ count.found = 0;
|
||||
+ count.surfaces = 0;
|
||||
+ rc = IDirectDraw7_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_CANBECREATED | DDENUMSURFACES_MATCH,
|
||||
+ &ddsd, &count, SurfaceCounter);
|
||||
+ ok(rc == DD_OK, "Expected DD_OK, got %x\n", rc);
|
||||
+ ok(count.found == 1, "Has %d surface descriptions, expected 1\n", count.found);
|
||||
+ ok(count.surfaces == 0, "Has %d surfaces, expected 0\n", count.surfaces);
|
||||
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
--
|
||||
2.1.0
|
||||
|
1
patches/ddraw-EnumSurfaces/definition
Normal file
1
patches/ddraw-EnumSurfaces/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [17233] Implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces
|
@ -91,6 +91,7 @@ patch_enable_all ()
|
||||
enable_d3dx9_36_Texture_Align="$1"
|
||||
enable_d3dx9_36_UpdateSkinnedMesh="$1"
|
||||
enable_dbghelp_Debug_Symbols="$1"
|
||||
enable_ddraw_EnumSurfaces="$1"
|
||||
enable_ddraw_Hotpatch="$1"
|
||||
enable_ddraw_d3d_execute_buffer="$1"
|
||||
enable_dinput_Events="$1"
|
||||
@ -341,6 +342,9 @@ patch_enable ()
|
||||
dbghelp-Debug_Symbols)
|
||||
enable_dbghelp_Debug_Symbols="$2"
|
||||
;;
|
||||
ddraw-EnumSurfaces)
|
||||
enable_ddraw_EnumSurfaces="$2"
|
||||
;;
|
||||
ddraw-Hotpatch)
|
||||
enable_ddraw_Hotpatch="$2"
|
||||
;;
|
||||
@ -1804,6 +1808,21 @@ if test "$enable_dbghelp_Debug_Symbols" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ddraw-EnumSurfaces
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#17233] Implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ddraw/ddraw.c, dlls/ddraw/tests/d3d.c
|
||||
# |
|
||||
if test "$enable_ddraw_EnumSurfaces" -eq 1; then
|
||||
patch_apply ddraw-EnumSurfaces/0001-ddraw-Implement-DDENUMSURFACES_CANBECREATED-in-IDire.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "ddraw: Implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces and fix some bugs.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ddraw-Hotpatch
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -1937,6 +1956,18 @@ if test "$enable_dxgi_GetDesc" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset makedep-PARENTSPEC
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * tools/makedep.c
|
||||
# |
|
||||
if test "$enable_makedep_PARENTSPEC" -eq 1; then
|
||||
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-DllRedirects
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -1957,18 +1988,6 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset makedep-PARENTSPEC
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * tools/makedep.c
|
||||
# |
|
||||
if test "$enable_makedep_PARENTSPEC" -eq 1; then
|
||||
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Helper
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
Reference in New Issue
Block a user