Commit 1be05ff7 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3dx9: Simplify D3DXCreateEffectCompilerFromResourceA().

parent aee3c0fa
......@@ -5684,26 +5684,19 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const ch
ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
{
HRSRC resinfo;
void *buffer;
DWORD size;
TRACE("(%p, %s): relay\n", srcmodule, debugstr_a(srcresource));
resinfo = FindResourceA(srcmodule, srcresource, (LPCSTR) RT_RCDATA);
if (resinfo)
{
LPVOID buffer;
HRESULT ret;
DWORD size;
ret = load_resource_into_memory(srcmodule, resinfo, &buffer, &size);
TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n",
srcmodule, debugstr_a(srcresource), defines, include, flags, effectcompiler, parseerrors);
if (FAILED(ret))
return D3DXERR_INVALIDDATA;
if (!(resinfo = FindResourceA(srcmodule, srcresource, (const char *)RT_RCDATA)))
return D3DXERR_INVALIDDATA;
return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors);
}
if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size)))
return D3DXERR_INVALIDDATA;
return D3DXERR_INVALIDDATA;
return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors);
}
HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WCHAR *srcresource,
......
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