Module: wine Branch: master Commit: 1da773ff4d102a512ce3ab3fedf7cb830216e384 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1da773ff4d102a512ce3ab3fed...
Author: Henri Verbeet hverbeet@gmail.com Date: Mon Feb 28 08:05:38 2011 +0100
wined3d: Merge device_unload_resource() and reset_unload_resources().
---
dlls/wined3d/device.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e2e4b86..365225b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2102,11 +2102,14 @@ err_out: return hr; }
-static HRESULT WINAPI device_unload_resource(IWineD3DResource *resource, void *ctx) +static HRESULT WINAPI device_unload_resource(IWineD3DResource *resource, void *data) { + TRACE("Unloading resource %p.\n", resource); + IWineD3DResource_UnLoad(resource); IWineD3DResource_Release(resource); - return WINED3D_OK; + + return S_OK; }
static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, @@ -6180,13 +6183,6 @@ static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRES return WINED3D_OK; }
-static HRESULT WINAPI reset_unload_resources(IWineD3DResource *resource, void *data) { - TRACE("Unloading resource %p\n", resource); - IWineD3DResource_UnLoad(resource); - IWineD3DResource_Release(resource); - return S_OK; -} - static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, const WINED3DPRESENT_PARAMETERS *pp) { UINT i, count; @@ -6223,7 +6219,7 @@ static void delete_opengl_contexts(IWineD3DDeviceImpl *device, IWineD3DSwapChain context = context_acquire(device, NULL); gl_info = context->gl_info;
- IWineD3DDevice_EnumResources((IWineD3DDevice *)device, reset_unload_resources, NULL); + IWineD3DDevice_EnumResources((IWineD3DDevice *)device, device_unload_resource, NULL); LIST_FOR_EACH_ENTRY(shader, &device->shaders, IWineD3DBaseShaderImpl, baseShader.shader_list_entry) { device->shader_backend->shader_destroy(shader);