Module: wine Branch: master Commit: 380d0cd0233f1f3721a7417eb52a34423d57a71a URL: http://source.winehq.org/git/wine.git/?a=commit;h=380d0cd0233f1f3721a7417eb5...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Nov 23 11:50:33 2012 +0800
windowscodecs: Implement QueryCapability of the TGA decoder.
---
dlls/windowscodecs/tgaformat.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c index ac57e54..bb6d969 100644 --- a/dlls/windowscodecs/tgaformat.c +++ b/dlls/windowscodecs/tgaformat.c @@ -182,11 +182,21 @@ static ULONG WINAPI TgaDecoder_Release(IWICBitmapDecoder *iface) return ref; }
-static HRESULT WINAPI TgaDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *pIStream, - DWORD *pdwCapability) +static HRESULT WINAPI TgaDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *stream, + DWORD *capability) { - FIXME("(%p,%p,%p): stub\n", iface, pIStream, pdwCapability); - return E_NOTIMPL; + HRESULT hr; + + TRACE("(%p,%p,%p)\n", iface, stream, capability); + + if (!stream || !capability) return E_INVALIDARG; + + hr = IWICBitmapDecoder_Initialize(iface, stream, WICDecodeMetadataCacheOnDemand); + if (hr != S_OK) return hr; + + *capability = WICBitmapDecoderCapabilityCanDecodeAllImages | + WICBitmapDecoderCapabilityCanDecodeSomeImages; + return S_OK; }
static HRESULT WINAPI TgaDecoder_Initialize(IWICBitmapDecoder *iface, IStream *pIStream,