From 3b3672360f9fe2bdb58ca4274a4f8884a8dd1154 Mon Sep 17 00:00:00 2001 From: winesync Date: Mon, 21 Sep 2020 22:56:57 +0200 Subject: [PATCH] [WINESYNC] d3dx9: Get rid of unused unlock_surface() argument. Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard wine commit id eadc7b3128afdf59891c6f9a1c568077c4e6d087 by Matteo Bruni --- dll/directx/wine/d3dx9_36/d3dx9_private.h | 2 +- dll/directx/wine/d3dx9_36/surface.c | 16 ++++++++-------- dll/directx/wine/d3dx9_36/texture.c | 2 +- sdk/tools/winesync/d3dx9.cfg | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9_private.h b/dll/directx/wine/d3dx9_36/d3dx9_private.h index b847b7a681f..66bbe21b4ae 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_private.h +++ b/dll/directx/wine/d3dx9_36/d3dx9_private.h @@ -123,7 +123,7 @@ HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, co const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN; -HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, +HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN; unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index a310a05e391..5d775c1617b 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -260,7 +260,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO return hr; } -HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, +HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, IDirect3DSurface9 *temp_surface, BOOL update) { IDirect3DDevice9 *device; @@ -612,7 +612,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur copy_pixels(locked_rect.pBits, locked_rect.Pitch, 0, pixels, dst_pitch, 0, &volume, pixel_format); - unlock_surface(src_surface, NULL, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, NULL, temp_surface, FALSE); *dst_buffer = buffer; return D3D_OK; @@ -1916,7 +1916,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, && src_size.height != surfdesc.Height)) { WARN("Source rect %s is misaligned.\n", wine_dbgstr_rect(src_rect)); - unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE); + unlock_surface(dst_surface, dst_rect, surface, FALSE); return D3DXERR_INVALIDDATA; } @@ -1929,7 +1929,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, || !is_conversion_to_supported(destformatdesc)) { FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format); - unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE); + unlock_surface(dst_surface, dst_rect, surface, FALSE); return E_NOTIMPL; } @@ -1950,7 +1950,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, } } - return unlock_surface(dst_surface, dst_rect, &lockrect, surface, TRUE); + return unlock_surface(dst_surface, dst_rect, surface, TRUE); } /************************************************************ @@ -2040,7 +2040,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, hr = D3DXLoadSurfaceFromMemory(dst_surface, dst_palette, dst_rect, lock.pBits, src_desc.Format, lock.Pitch, src_palette, src_rect, filter, color_key); - if (FAILED(unlock_surface(src_surface, NULL, &lock, temp_surface, FALSE))) + if (FAILED(unlock_surface(src_surface, NULL, temp_surface, FALSE))) return D3DXERR_INVALIDDATA; return hr; @@ -2221,7 +2221,7 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE IWICBitmapFrameEncode_WritePixels(frame, height, locked_rect.Pitch, height * locked_rect.Pitch, locked_rect.pBits); - unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, src_rect, temp_surface, FALSE); } else /* Pixel format conversion */ { @@ -2258,7 +2258,7 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE } convert_argb_pixels(locked_rect.pBits, locked_rect.Pitch, 0, &size, src_format_desc, dst_data, dst_pitch, 0, &size, dst_format_desc, 0, NULL); - unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, src_rect, temp_surface, FALSE); IWICBitmapFrameEncode_WritePixels(frame, height, dst_pitch, dst_pitch * height, dst_data); HeapFree(GetProcessHeap(), 0, dst_data); diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index 0ebb4bea4a0..25a0fe0524a 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -1383,7 +1383,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); } } - if (FAILED(hr = unlock_surface(surface, NULL, &lock_rect, temp_surface, TRUE))) + if (FAILED(hr = unlock_surface(surface, NULL, temp_surface, TRUE))) { IDirect3DSurface9_Release(surface); return hr; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 7c5682d4be6..fcefba28744 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 378204527e1f42ed1373a0cd7356770d235e319d} +tags: {wine: eadc7b3128afdf59891c6f9a1c568077c4e6d087}