Module: wine Branch: stable Commit: 178d778b8999dd7d767e588519f32de058feef93 URL: https://source.winehq.org/git/wine.git/?a=commit;h=178d778b8999dd7d767e58851...
Author: Andrey Gusev andrey.goosev@gmail.com Date: Mon Mar 16 16:50:20 2020 +0200
d3dx11: Add D3DX11GetImageInfoFromFileA/W stub.
For Project Cars.
Signed-off-by: Andrey Gusev andrey.goosev@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 20a2094ecd4112313d30904284a0fdf7ccedcfa7) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/d3dx11_42/d3dx11_42.spec | 4 ++-- dlls/d3dx11_43/d3dx11_43.spec | 4 ++-- dlls/d3dx11_43/main.c | 22 ++++++++++++++++++++++ include/d3dx11tex.h | 4 ++++ 4 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec index 30bdba4244..99a38557b8 100644 --- a/dlls/d3dx11_42/d3dx11_42.spec +++ b/dlls/d3dx11_42/d3dx11_42.spec @@ -27,8 +27,8 @@ @ stub D3DX11CreateTextureFromResourceW @ stub D3DX11CreateThreadPump @ stdcall D3DX11FilterTexture(ptr ptr long long) -@ stub D3DX11GetImageInfoFromFileA -@ stub D3DX11GetImageInfoFromFileW +@ stdcall D3DX11GetImageInfoFromFileA(str ptr ptr ptr) +@ stdcall D3DX11GetImageInfoFromFileW(wstr ptr ptr ptr) @ stdcall D3DX11GetImageInfoFromMemory(ptr long ptr ptr ptr) @ stub D3DX11GetImageInfoFromResourceA @ stub D3DX11GetImageInfoFromResourceW diff --git a/dlls/d3dx11_43/d3dx11_43.spec b/dlls/d3dx11_43/d3dx11_43.spec index 30bdba4244..99a38557b8 100644 --- a/dlls/d3dx11_43/d3dx11_43.spec +++ b/dlls/d3dx11_43/d3dx11_43.spec @@ -27,8 +27,8 @@ @ stub D3DX11CreateTextureFromResourceW @ stub D3DX11CreateThreadPump @ stdcall D3DX11FilterTexture(ptr ptr long long) -@ stub D3DX11GetImageInfoFromFileA -@ stub D3DX11GetImageInfoFromFileW +@ stdcall D3DX11GetImageInfoFromFileA(str ptr ptr ptr) +@ stdcall D3DX11GetImageInfoFromFileW(wstr ptr ptr ptr) @ stdcall D3DX11GetImageInfoFromMemory(ptr long ptr ptr ptr) @ stub D3DX11GetImageInfoFromResourceA @ stub D3DX11GetImageInfoFromResourceW diff --git a/dlls/d3dx11_43/main.c b/dlls/d3dx11_43/main.c index 215a51b715..e8eac58cbb 100644 --- a/dlls/d3dx11_43/main.c +++ b/dlls/d3dx11_43/main.c @@ -58,6 +58,28 @@ HRESULT WINAPI D3DX11FilterTexture(ID3D11DeviceContext *context, ID3D11Resource return E_NOTIMPL; }
+HRESULT WINAPI D3DX11GetImageInfoFromFileA(const char *filename, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, + HRESULT *hresult) +{ + FIXME("filename %s, pump %p, img_info %p, hresult %p stub!\n", debugstr_a(filename), pump, img_info, hresult); + + if (!filename) + return E_FAIL; + + return E_NOTIMPL; +} + +HRESULT WINAPI D3DX11GetImageInfoFromFileW(const WCHAR *filename, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, + HRESULT *hresult) +{ + FIXME("filename %s, pump %p, img_info %p, hresult %p stub!\n", debugstr_w(filename), pump, img_info, hresult); + + if (!filename) + return E_FAIL; + + return E_NOTIMPL; +} + HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, HRESULT *hresult) { diff --git a/include/d3dx11tex.h b/include/d3dx11tex.h index b7c00ac4fd..c8a47925c8 100644 --- a/include/d3dx11tex.h +++ b/include/d3dx11tex.h @@ -119,6 +119,10 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *src_data, SIZE_T src_data_size, D3DX11_IMAGE_LOAD_INFO *loadinfo, ID3DX11ThreadPump *pump, ID3D11Resource **texture, HRESULT *hresult); HRESULT WINAPI D3DX11FilterTexture(ID3D11DeviceContext *context, ID3D11Resource *texture, UINT src_level, UINT filter); +HRESULT WINAPI D3DX11GetImageInfoFromFileA(const char *filename, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, + HRESULT *hresult); +HRESULT WINAPI D3DX11GetImageInfoFromFileW(const WCHAR *filename, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, + HRESULT *hresult); HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump, D3DX11_IMAGE_INFO *img_info, HRESULT *hresult); HRESULT WINAPI D3DX11SaveTextureToFileA(ID3D11DeviceContext *context, ID3D11Resource *texture,