Commit 36ef502e authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3dx9_36: Forward D3DXCreateTextureFromFileExW to D3DXCreateTextureFromFileInMemoryEx.

parent b141e6e3
......@@ -95,7 +95,7 @@
@ stdcall D3DXCreateTexture(ptr long long long long long long ptr)
@ stub D3DXCreateTextureFromFileA
@ stub D3DXCreateTextureFromFileExA
@ stub D3DXCreateTextureFromFileExW
@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr)
@ stub D3DXCreateTextureFromFileInMemory
@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ stub D3DXCreateTextureFromFileW
......
......@@ -70,3 +70,40 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 device,
return E_NOTIMPL;
}
HRESULT WINAPI D3DXCreateTextureFromFileExW(LPDIRECT3DDEVICE9 device,
LPCWSTR srcfile,
UINT width,
UINT height,
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
DWORD filter,
DWORD mipfilter,
D3DCOLOR colorkey,
D3DXIMAGE_INFO *srcinfo,
PALETTEENTRY *palette,
LPDIRECT3DTEXTURE9 *texture)
{
HRESULT hr;
DWORD size;
LPVOID buffer;
TRACE("(%p, %p, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p): relay\n", device, debugstr_w(srcfile), width,
height, miplevels, usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture);
if (!srcfile)
return D3DERR_INVALIDCALL;
hr = map_view_of_file(srcfile, &buffer, &size);
if (FAILED(hr))
return D3DXERR_INVALIDDATA;
hr = D3DXCreateTextureFromFileInMemoryEx(device, buffer, size, width, height, miplevels, usage, format, pool,
filter, mipfilter, colorkey, srcinfo, palette, texture);
UnmapViewOfFile(buffer);
return hr;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment