Commit b8b3acbf authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

d3dx10: Add support for ID3DX10ThreadPump parameter in D3DX10GetImageInfoFromResourceA.

parent 9b0e3de4
......@@ -373,10 +373,32 @@ HRESULT WINAPI D3DX10GetImageInfoFromResourceA(HMODULE module, const char *resou
TRACE("module %p, resource %s, pump %p, info %p, result %p.\n",
module, debugstr_a(resource), pump, info, result);
if (FAILED((hr = load_resourceA(module, resource, &buffer, &size))))
if (pump)
{
ID3DX10DataProcessor *processor;
ID3DX10DataLoader *loader;
if (FAILED((hr = D3DX10CreateAsyncResourceLoaderA(module, resource, &loader))))
return hr;
if (FAILED((hr = D3DX10CreateAsyncTextureInfoProcessor(info, &processor))))
{
ID3DX10DataLoader_Destroy(loader);
return hr;
}
if (FAILED((hr = ID3DX10ThreadPump_AddWorkItem(pump, loader, processor, result, NULL))))
{
ID3DX10DataLoader_Destroy(loader);
ID3DX10DataProcessor_Destroy(processor);
}
return hr;
}
return D3DX10GetImageInfoFromMemory(buffer, size, pump, info, result);
if (FAILED((hr = load_resourceA(module, resource, &buffer, &size))))
return hr;
hr = get_image_info(buffer, size, info);
if (result)
*result = hr;
return hr;
}
HRESULT WINAPI D3DX10GetImageInfoFromResourceW(HMODULE module, const WCHAR *resource, ID3DX10ThreadPump *pump,
......
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