ddraw: Get rid of the useless "ddraw_owner" fields.

This commit is contained in:
Henri Verbeet 2010-07-19 12:47:57 +02:00 committed by Alexandre Julliard
parent 16b3f17f87
commit f461b39b76
4 changed files with 6 additions and 14 deletions

View File

@ -254,19 +254,17 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
static HRESULT WINAPI IDirectDrawClipperImpl_Initialize(
LPDIRECTDRAWCLIPPER iface, LPDIRECTDRAW lpDD, DWORD dwFlags
) {
IDirectDrawImpl* pOwner;
IDirectDrawClipperImpl *This = (IDirectDrawClipperImpl *)iface;
TRACE("(%p)->(%p,0x%08x)\n", This, lpDD, dwFlags);
EnterCriticalSection(&ddraw_cs);
if (This->ddraw_owner != NULL)
if (This->initialized)
{
LeaveCriticalSection(&ddraw_cs);
return DDERR_ALREADYINITIALIZED;
}
pOwner = lpDD ? ddraw_from_ddraw1(lpDD) : NULL;
This->ddraw_owner = pOwner;
This->initialized = TRUE;
LeaveCriticalSection(&ddraw_cs);
return DD_OK;

View File

@ -3041,7 +3041,6 @@ IDirectDrawImpl_CreatePalette(IDirectDraw7 *iface,
object->lpVtbl = &IDirectDrawPalette_Vtbl;
object->ref = 1;
object->ddraw_owner = This;
hr = IWineD3DDevice_CreatePalette(This->wineD3DDevice, Flags,
ColorTable, &object->wineD3DPalette, (IUnknown *)object);

View File

@ -469,7 +469,7 @@ struct IDirectDrawClipperImpl
LONG ref;
IWineD3DClipper *wineD3DClipper;
IDirectDrawImpl *ddraw_owner;
BOOL initialized;
};
extern const IDirectDrawClipperVtbl IDirectDrawClipper_Vtbl DECLSPEC_HIDDEN;
@ -489,7 +489,6 @@ struct IDirectDrawPaletteImpl
IWineD3DPalette *wineD3DPalette;
/* IDirectDrawPalette fields */
IDirectDrawImpl *ddraw_owner;
IUnknown *ifaceToRelease;
};
extern const IDirectDrawPaletteVtbl IDirectDrawPalette_Vtbl DECLSPEC_HIDDEN;

View File

@ -1676,14 +1676,10 @@ IDirectDrawSurfaceImpl_GetSurfaceDesc(IDirectDrawSurface7 *iface,
* DDERR_ALREADYINITIALIZED
*
*****************************************************************************/
static HRESULT WINAPI
IDirectDrawSurfaceImpl_Initialize(IDirectDrawSurface7 *iface,
IDirectDraw *DD,
DDSURFACEDESC2 *DDSD)
static HRESULT WINAPI IDirectDrawSurfaceImpl_Initialize(IDirectDrawSurface7 *iface,
IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
{
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
IDirectDrawImpl *ddimpl = DD ? ddraw_from_ddraw1(DD) : NULL;
TRACE("(%p)->(%p,%p)\n",This,ddimpl,DDSD);
TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
return DDERR_ALREADYINITIALIZED;
}