From 7f09eb6a7a7a8a285d0f90a8998bcc1fda32cdc9 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 8 Dec 2010 18:28:11 +0100 Subject: [PATCH] wined3d: Pass an IWineD3DDeviceImpl pointer to free_private(). --- dlls/wined3d/arb_program_shader.c | 4 ++-- dlls/wined3d/device.c | 6 +++--- dlls/wined3d/surface.c | 4 ++-- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index eb0056ff88e..7dc3c81f537 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -6514,8 +6514,8 @@ static HRESULT arbfp_blit_alloc(IWineD3DDeviceImpl *device) } /* Context activation is done by the caller. */ -static void arbfp_blit_free(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; +static void arbfp_blit_free(IWineD3DDeviceImpl *device) +{ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct arbfp_blit_priv *priv = device->blit_priv; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 53b0c36ba05..15b90209467 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2050,7 +2050,7 @@ err_out: This->stateBlock = NULL; } if (This->blit_priv) { - This->blitter->free_private(iface); + This->blitter->free_private(This); } if (This->fragment_priv) { This->frag_pipe->free_private(This); @@ -2185,7 +2185,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, } /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */ - This->blitter->free_private(iface); + This->blitter->free_private(This); This->frag_pipe->free_private(This); This->shader_backend->shader_free_private(This); @@ -6199,7 +6199,7 @@ static void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChainImpl } LEAVE_GL(); - This->blitter->free_private(iface); + This->blitter->free_private(This); This->frag_pipe->free_private(This); This->shader_backend->shader_free_private(This); destroy_dummy_textures(This, gl_info); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 05ce89bf8d7..994f3bc1725 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4734,7 +4734,7 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = static HRESULT ffp_blit_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; } /* Context activation is done by the caller. */ -static void ffp_blit_free(IWineD3DDevice *iface) { } +static void ffp_blit_free(IWineD3DDeviceImpl *device) { } /* This function is used in case of 8bit paletted textures using GL_EXT_paletted_texture */ /* Context activation is done by the caller. */ @@ -4871,7 +4871,7 @@ static HRESULT cpu_blit_alloc(IWineD3DDeviceImpl *device) } /* Context activation is done by the caller. */ -static void cpu_blit_free(IWineD3DDevice *iface) +static void cpu_blit_free(IWineD3DDeviceImpl *device) { } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a20a0ad0b4a..bb7b1f54777 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1176,7 +1176,7 @@ enum blit_operation struct blit_shader { HRESULT (*alloc_private)(IWineD3DDeviceImpl *device); - void (*free_private)(IWineD3DDevice *iface); + void (*free_private)(IWineD3DDeviceImpl *device); HRESULT (*set_shader)(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface); void (*unset_shader)(IWineD3DDevice *iface); BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op,