From c117248bd1a2053a64696c6b5992803652d5f2f5 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 7 Jan 2011 10:16:41 +0100 Subject: [PATCH] wined3d: Pass an IWineD3DResourceImpl pointer to resource_get_type(). --- dlls/wined3d/buffer.c | 2 +- dlls/wined3d/cubetexture.c | 5 +++-- dlls/wined3d/resource.c | 7 +++---- dlls/wined3d/surface_base.c | 6 +++--- dlls/wined3d/texture.c | 5 +++-- dlls/wined3d/volume.c | 5 +++-- dlls/wined3d/volumetexture.c | 5 +++-- dlls/wined3d/wined3d_private.h | 2 +- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index bc94a5ad2b7..ffc4511a1e0 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1190,7 +1190,7 @@ end: static WINED3DRESOURCETYPE STDMETHODCALLTYPE buffer_GetType(IWineD3DBuffer *iface) { - return resource_get_type((IWineD3DResource *)iface); + return resource_get_type((IWineD3DResourceImpl *)iface); } /* IWineD3DBuffer methods */ diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index 40784bac4a4..cc2c6e9c9b5 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -270,8 +270,9 @@ static void WINAPI IWineD3DCubeTextureImpl_UnLoad(IWineD3DCubeTexture *iface) basetexture_unload((IWineD3DBaseTextureImpl *)This); } -static WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) { - return resource_get_type((IWineD3DResource *)iface); +static WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) +{ + return resource_get_type((IWineD3DResourceImpl *)iface); } static void * WINAPI IWineD3DCubeTextureImpl_GetParent(IWineD3DCubeTexture *iface) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index f33ee37851a..73b9943c2e2 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -264,9 +264,8 @@ DWORD resource_get_priority(struct IWineD3DResourceImpl *resource) return resource->resource.priority; } -WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) +WINED3DRESOURCETYPE resource_get_type(struct IWineD3DResourceImpl *resource) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - TRACE("(%p) : returning %d\n", This, This->resource.resourceType); - return This->resource.resourceType; + TRACE("resource %p, returning %#x.\n", resource, resource->resource.resourceType); + return resource->resource.resourceType; } diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 1ce099cd7dd..ae0643e6dbe 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -138,9 +138,9 @@ DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) return resource_get_priority((IWineD3DResourceImpl *)iface); } -WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) { - TRACE("(%p) : calling resourceimpl_GetType\n", iface); - return resource_get_type((IWineD3DResource *)iface); +WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) +{ + return resource_get_type((IWineD3DResourceImpl *)iface); } void * WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 8b42d17e8d7..036fa2e1fe4 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -291,8 +291,9 @@ static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) { basetexture_unload((IWineD3DBaseTextureImpl *)This); } -static WINED3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) { - return resource_get_type((IWineD3DResource *)iface); +static WINED3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) +{ + return resource_get_type((IWineD3DResourceImpl *)iface); } static void * WINAPI IWineD3DTextureImpl_GetParent(IWineD3DTexture *iface) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index b6def080fe7..566135c0f7b 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -193,8 +193,9 @@ static void WINAPI IWineD3DVolumeImpl_UnLoad(IWineD3DVolume *iface) resource_unload((IWineD3DResourceImpl *)iface); } -static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *iface) { - return resource_get_type((IWineD3DResource *)iface); +static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *iface) +{ + return resource_get_type((IWineD3DResourceImpl *)iface); } static void WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, WINED3DVOLUME_DESC *desc) diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 9a4fd40ff96..94f5b05ece2 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -207,8 +207,9 @@ static void WINAPI IWineD3DVolumeTextureImpl_UnLoad(IWineD3DVolumeTexture *iface basetexture_unload((IWineD3DBaseTextureImpl *)This); } -static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) { - return resource_get_type((IWineD3DResource *)iface); +static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) +{ + return resource_get_type((IWineD3DResourceImpl *)iface); } static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DVolumeTexture *iface) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index dbfd4e33dee..af5e79fdf01 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1836,7 +1836,7 @@ HRESULT resource_get_private_data(struct IWineD3DResourceImpl *resource, REFGUID HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE resource_type, IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format, WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN; +WINED3DRESOURCETYPE resource_get_type(struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN; DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priority) DECLSPEC_HIDDEN; HRESULT resource_set_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid, const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN;