mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
ddraw: Get rid of the useless "ddraw_owner" fields.
This commit is contained in:
parent
16b3f17f87
commit
f461b39b76
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user