From 6623915b616ef5befe0a5665c80dd7aa50d64d94 Mon Sep 17 00:00:00 2001 From: Ziqing Hui Date: Tue, 5 Oct 2021 16:31:55 +0800 Subject: [PATCH] d3dx10: Add stubs for D3DX10CreateTextureFromFile{A,W}. Signed-off-by: Ziqing Hui Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dx10_43/d3dx10_43.spec | 4 ++-- dlls/d3dx10_43/texture.c | 16 ++++++++++++++++ include/d3dx10tex.h | 6 ++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx10_43/d3dx10_43.spec b/dlls/d3dx10_43/d3dx10_43.spec index 8bc9451aeab..af349afae02 100644 --- a/dlls/d3dx10_43/d3dx10_43.spec +++ b/dlls/d3dx10_43/d3dx10_43.spec @@ -42,8 +42,8 @@ @ stub D3DX10CreateShaderResourceViewFromResourceW(ptr long wstr ptr ptr ptr ptr) @ stub D3DX10CreateSkinInfo(ptr) @ stdcall D3DX10CreateSprite(ptr long ptr) -@ stub D3DX10CreateTextureFromFileA(ptr str ptr ptr ptr ptr) -@ stub D3DX10CreateTextureFromFileW(ptr wstr ptr ptr ptr ptr) +@ stdcall D3DX10CreateTextureFromFileA(ptr str ptr ptr ptr ptr) +@ stdcall D3DX10CreateTextureFromFileW(ptr wstr ptr ptr ptr ptr) @ stdcall D3DX10CreateTextureFromMemory(ptr ptr long ptr ptr ptr ptr) @ stub D3DX10CreateTextureFromResourceA(ptr long str ptr ptr ptr ptr) @ stub D3DX10CreateTextureFromResourceW(ptr long wstr ptr ptr ptr ptr) diff --git a/dlls/d3dx10_43/texture.c b/dlls/d3dx10_43/texture.c index 32215b0a99a..5aca98610a9 100644 --- a/dlls/d3dx10_43/texture.c +++ b/dlls/d3dx10_43/texture.c @@ -573,6 +573,22 @@ end: return S_OK; } +HRESULT WINAPI D3DX10CreateTextureFromFileA(ID3D10Device *device, const char *src_file, + D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult) +{ + FIXME("device %p, src_file %s, load_info %p, pump %p, texture %p, hresult %p stub!\n", + device, debugstr_a(src_file), load_info, pump, texture, hresult); + return E_NOTIMPL; +} + +HRESULT WINAPI D3DX10CreateTextureFromFileW(ID3D10Device *device, const WCHAR *src_file, + D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult) +{ + FIXME("device %p, src_file %s, load_info %p, pump %p, texture %p, hresult %p stub!\n", + device, debugstr_w(src_file), load_info, pump, texture, hresult); + return E_NOTIMPL; +} + HRESULT WINAPI D3DX10CreateTextureFromMemory(ID3D10Device *device, const void *src_data, SIZE_T src_data_size, D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult) { diff --git a/include/d3dx10tex.h b/include/d3dx10tex.h index 0f92fd38e6e..022afdd51d9 100644 --- a/include/d3dx10tex.h +++ b/include/d3dx10tex.h @@ -156,6 +156,12 @@ HRESULT WINAPI D3DX10GetImageInfoFromResourceW(HMODULE module, const WCHAR *reso HRESULT WINAPI D3DX10GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX10ThreadPump *pump, D3DX10_IMAGE_INFO *img_info, HRESULT *hresult); +HRESULT WINAPI D3DX10CreateTextureFromFileA(ID3D10Device *device, const char *src_file, + D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult); +HRESULT WINAPI D3DX10CreateTextureFromFileW(ID3D10Device *device, const WCHAR *src_file, + D3DX10_IMAGE_LOAD_INFO *load_info, ID3DX10ThreadPump *pump, ID3D10Resource **texture, HRESULT *hresult); +#define D3DX10CreateTextureFromFile WINELIB_NAME_AW(D3DX10CreateTextureFromFile) + HRESULT WINAPI D3DX10LoadTextureFromTexture(ID3D10Resource *src_texture, D3DX10_TEXTURE_LOAD_INFO *load_info, ID3D10Resource *dst_texture);