Commit b4d48c7f authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Search for d3d primary a bit differently.

parent 67e2c97a
...@@ -2341,7 +2341,8 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface, ...@@ -2341,7 +2341,8 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
LIST_FOR_EACH(entry, &This->surface_list) LIST_FOR_EACH(entry, &This->surface_list)
{ {
surface = LIST_ENTRY(entry, IDirectDrawSurfaceImpl, surface_list_entry); surface = LIST_ENTRY(entry, IDirectDrawSurfaceImpl, surface_list_entry);
if(surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) if((surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER)) ==
(DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER))
{ {
/* found */ /* found */
target = surface; target = surface;
...@@ -2351,7 +2352,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface, ...@@ -2351,7 +2352,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
} }
TRACE("(%p) Attaching a D3DDevice, rendertarget = %p\n", This, target); TRACE("(%p) Attaching a D3DDevice, rendertarget = %p\n", This, target);
hr = IDirectDrawImpl_AttachD3DDevice(This, target->first_complex); hr = IDirectDrawImpl_AttachD3DDevice(This, target);
if(hr != D3D_OK) if(hr != D3D_OK)
{ {
ERR("IDirectDrawImpl_AttachD3DDevice failed, hr = %x\n", hr); ERR("IDirectDrawImpl_AttachD3DDevice failed, hr = %x\n", hr);
...@@ -2636,7 +2637,7 @@ D3D7CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, ...@@ -2636,7 +2637,7 @@ D3D7CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior,
HANDLE* pSharedHandle) HANDLE* pSharedHandle)
{ {
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, device); ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, device);
IDirectDrawSurfaceImpl *d3dSurface = This->d3d_target->first_complex, *target = NULL; IDirectDrawSurfaceImpl *d3dSurface = This->d3d_target, *target = NULL;
TRACE("(%p) call back\n", device); TRACE("(%p) call back\n", device);
if(d3dSurface->isRenderTarget) if(d3dSurface->isRenderTarget)
......
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